Skip to content

Commit

Permalink
Simple snapshot.restore test case that also exposes the bug mentioned…
Browse files Browse the repository at this point in the history
  • Loading branch information
szroland committed Jun 30, 2015
1 parent 04631d6 commit 71a77da
Showing 1 changed file with 57 additions and 0 deletions.
@@ -0,0 +1,57 @@
---
setup:

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

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

- do:
cluster.health:
wait_for_status: yellow

---
"Create a snapshot and then restore it":

- do:
snapshot.create:
repository: test_repo1
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:
indices.close:
index : test_index

- do:
snapshot.restore:
repository: test_repo1
snapshot: test_snapshot
wait_for_completion: true

- do:
indices.recovery:
index: test_index

- match: { test_index.shards.0.type: SNAPSHOT }
- match: { test_index.shards.0.stage: DONE }
- match: { test_index.shards.0.index.files.recovered: 1}
- gt: { test_index.shards.0.index.size.recovered_in_bytes: 0}
- match: { test_index.shards.0.index.files.reused: 0}
- match: { test_index.shards.0.index.size.reused_in_bytes: 0}

0 comments on commit 71a77da

Please sign in to comment.