"Fossies" - the Fresh Open Source Software Archive

Member "elasticsearch-6.8.5/rest-api-spec/src/main/resources/rest-api-spec/test/indices.segments/10_basic.yml" (13 Nov 2019, 1490 Bytes) of package /linux/www/elasticsearch-6.8.5-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 "no segments test":
    3   - do:
    4       indices.segments:
    5         allow_no_indices: true
    6 
    7   - match:   { _shards.total: 0}
    8   - match:   { indices: {}}
    9 
   10   - do:
   11       catch: missing
   12       indices.segments:
   13         allow_no_indices: false
   14 
   15 ---
   16 "basic segments test":
   17 
   18   - do:
   19       indices.create:
   20         index: index1
   21         body:
   22           settings:
   23             number_of_shards: "1"
   24             number_of_replicas: "0"
   25   - do:
   26       index:
   27         index: index1
   28         type: type
   29         body: { foo: bar }
   30         refresh: true
   31 
   32   - do:
   33        cluster.health:
   34          wait_for_status: green
   35 
   36   - do:
   37       indices.segments:
   38           index: index1
   39 
   40   - match:   { _shards.total: 1}
   41   - match:   { indices.index1.shards.0.0.routing.primary: true}
   42   - match:   { indices.index1.shards.0.0.segments._0.num_docs: 1}
   43 
   44 ---
   45 "closed segments test":
   46   - skip:
   47       version: " - 5.99.99"
   48       reason:  status code  on closed indices changed in 6.0.0 from 403 to 400
   49 
   50   - do:
   51       indices.create:
   52         index: index1
   53         body:
   54           settings:
   55             number_of_shards: "1"
   56             number_of_replicas: "0"
   57   - do:
   58       index:
   59         index: index1
   60         type: type
   61         body: { foo: bar }
   62         refresh: true
   63 
   64   - do:
   65       indices.close:
   66         index: index1
   67 
   68   - do:
   69       catch: bad_request
   70       indices.segments:
   71           index: index1
   72 
   73   - do:
   74       indices.segments:
   75           index: index1
   76           ignore_unavailable: true
   77 
   78   - match:   { _shards.total: 0}