Skip to content

Commit

Permalink
Added tests for POST /_remotestore/_restore.
Browse files Browse the repository at this point in the history
Signed-off-by: dblock <[email protected]>
  • Loading branch information
dblock committed Dec 17, 2024
1 parent 150159b commit 14c9511
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test-spec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ jobs:
tests: routing
- version: 2.18.0
tests: snapshot
- version: 2.18.0
tests: remote_store
- version: 2.18.0
tests: dangling
url: http://localhost:9200
Expand Down
23 changes: 23 additions & 0 deletions tests/remote_store/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3'

services:
opensearch-cluster:
image: ${OPENSEARCH_DOCKER_HUB_PROJECT:-opensearchproject}/opensearch:${OPENSEARCH_VERSION:-latest}${OPENSEARCH_DOCKER_REF}
ports:
- 9200:9200
- 9600:9600
environment:
- OPENSEARCH_INITIAL_ADMIN_PASSWORD=${OPENSEARCH_PASSWORD:-myStrongPassword123!}
- OPENSEARCH_JAVA_OPTS=${OPENSEARCH_JAVA_OPTS}
- cluster.remote_store.state.enabled=true
- discovery.type=single-node
- node.attr.remote_store.repository.fs-segment-store.settings.location=/tmp/opensearch/repo/segment
- node.attr.remote_store.repository.fs-segment-store.type=fs
- node.attr.remote_store.repository.fs-state-store.settings.location=/tmp/opensearch/repo/state
- node.attr.remote_store.repository.fs-state-store.type=fs
- node.attr.remote_store.repository.fs-translog-store.settings.location=/tmp/opensearch/repo/translog
- node.attr.remote_store.repository.fs-translog-store.type=fs
- node.attr.remote_store.segment.repository=fs-segment-store
- node.attr.remote_store.state.repository=fs-state-store
- node.attr.remote_store.translog.repository=fs-translog-store
- path.repo=/tmp/opensearch/repo
26 changes: 26 additions & 0 deletions tests/remote_store/remote_store/restore.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
$schema: ../../../json_schemas/test_story.schema.yaml

description: Test restore from a remote store.
prologues:
- path: /_bulk
method: POST
parameters:
refresh: true
request:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 60}
- {create: {_index: movies, _id: movie1}}
- {director: Bennett Miller, title: The Cruise, year: 1998}
- {create: {_index: movies, _id: movie2}}
- {director: Nicolas Winding Refn, title: Drive, year: 1960}
chapters:
- synopsis: Restore from remote store.
path: /_remotestore/_restore
method: POST
request:
payload:
indices:
- movies

0 comments on commit 14c9511

Please sign in to comment.