diff --git a/.github/workflows/test-spec.yml b/.github/workflows/test-spec.yml index d3b495ca..d166b375 100644 --- a/.github/workflows/test-spec.yml +++ b/.github/workflows/test-spec.yml @@ -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 diff --git a/tests/remote_store/docker-compose.yml b/tests/remote_store/docker-compose.yml new file mode 100644 index 00000000..89c151c7 --- /dev/null +++ b/tests/remote_store/docker-compose.yml @@ -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 diff --git a/tests/remote_store/remote_store/restore.yaml b/tests/remote_store/remote_store/restore.yaml new file mode 100644 index 00000000..7a549782 --- /dev/null +++ b/tests/remote_store/remote_store/restore.yaml @@ -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 +