All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rest-api-spec.test.snapshot.create.10_basic.yml Maven / Gradle / Ivy

The newest version!
---
setup:

  - do:
      snapshot.create_repository:
        repository: test_repo_create_1
        body:
          type: fs
          settings:
            location: "test_repo_create_1_loc"

  - do:
      indices.create:
        index: test_index
        body:
          settings:
            number_of_shards:   1
            number_of_replicas: 1

---
"Create a snapshot":

  - do:
      snapshot.create:
        repository: test_repo_create_1
        snapshot: test_snapshot
        wait_for_completion: true

  - match: { snapshot.snapshot: test_snapshot }
  - match: { snapshot.state : SUCCESS }
  - match: { snapshot.shards.successful: 1 }
  - match: { snapshot.shards.failed : 0 }

  - do:
      snapshot.delete:
        repository: test_repo_create_1
        snapshot: test_snapshot

  - match: { acknowledged: true }

---
"Create a snapshot for missing index":
  - skip:
      version: " - 6.0.0"
      reason: ignore_unavailable default is false in 6.0.0

  - do:
      catch: missing
      snapshot.create:
        repository: test_repo_create_1
        snapshot: test_snapshot_1
        wait_for_completion: true
        body: |
          { "indices": "missing_1" }

  - do:
      snapshot.create:
        repository: test_repo_create_1
        snapshot: test_snapshot_2
        wait_for_completion: true
        body: |
          { "indices": "missing_2", "ignore_unavailable": true }

  - match: { snapshot.snapshot: test_snapshot_2 }
  - match: { snapshot.state : SUCCESS }
  - match: { snapshot.shards.successful: 0 }
  - match: { snapshot.shards.failed : 0 }

  - do:
      snapshot.delete:
        repository: test_repo_create_1
        snapshot: test_snapshot_2

  - match: { acknowledged: true }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy