"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.23/rest-api-spec/src/main/resources/rest-api-spec/test/indices.put_alias/10_basic.yml" (29 Dec 2021, 1494 Bytes) of package /linux/www/elasticsearch-6.8.23-src.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Ansible YAML source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 ---
    2 "Basic test for put alias":
    3 
    4   - do:
    5       indices.create:
    6         index: test_index
    7 
    8   - do:
    9       indices.exists_alias:
   10         name: test_alias
   11 
   12   - is_false: ''
   13 
   14   - do:
   15       indices.put_alias:
   16         index: test_index
   17         name: test_alias
   18 
   19   - do:
   20       indices.exists_alias:
   21         name: test_alias
   22 
   23   - is_true: ''
   24 
   25   - do:
   26       indices.get_alias:
   27         name: test_alias
   28 
   29   - match: {test_index.aliases.test_alias: {}}
   30 
   31 ---
   32 "Can't create alias with invalid characters":
   33   - skip:
   34       version: " - 5.0.99"
   35       reason:  alias name validation was introduced in 5.1.0
   36 
   37   - do:
   38       indices.create:
   39         index: test_index
   40 
   41   - do:
   42       catch: bad_request
   43       indices.put_alias:
   44         index: test_index
   45         name: test_*
   46 
   47 ---
   48 "Can't create alias with the same name as an index":
   49 
   50   - do:
   51       indices.create:
   52         index: test_index
   53   - do:
   54       indices.create:
   55         index: foo
   56 
   57   - do:
   58       catch: bad_request
   59       indices.put_alias:
   60         index: test_index
   61         name: foo
   62 
   63 ---
   64 "Can set is_write_index":
   65 
   66   - skip:
   67       version: " - 6.3.99"
   68       reason: "is_write_index is only available from 6.4.0 on"
   69 
   70   - do:
   71       indices.create:
   72         index: test_index
   73 
   74   - do:
   75       indices.put_alias:
   76         index: test_index
   77         name: test_alias
   78         body:
   79           is_write_index: true
   80 
   81   - do:
   82       indices.get_alias:
   83         index: test_index
   84         name: test_alias
   85   - match: {test_index.aliases.test_alias: { 'is_write_index': true }}