diff --git a/.ci/functions/imports.sh b/.ci/functions/imports.sh index 1433057d..0146a121 100755 --- a/.ci/functions/imports.sh +++ b/.ci/functions/imports.sh @@ -16,9 +16,6 @@ if [[ -z $opensearch_node_name ]]; then export opensearch_node_name=instance export opensearch_image=opensearchproject/opensearch - if [[ "$CLUSTER" == "opendistro" ]]; then - export opensearch_image=amazon/opendistro-for-elasticsearch - fi export opensearch_url=$OPENSEARCH_URL_EXTENSION://${opensearch_node_name}:9200 export external_opensearch_url=${opensearch_url/$opensearch_node_name/localhost} diff --git a/.ci/opendistro/Dockerfile b/.ci/opendistro/Dockerfile deleted file mode 100644 index 611022c6..00000000 --- a/.ci/opendistro/Dockerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM amazon/opendistro-for-elasticsearch:1.13.2 -ARG SECURE_INTEGRATION -RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then /usr/share/elasticsearch/bin/elasticsearch-plugin remove opendistro_security; fi -COPY --chown=elasticsearch:elasticsearch .ci/opendistro/elasticsearch.yml /usr/share/elasticsearch/config/ diff --git a/.ci/opendistro/elasticsearch.yml b/.ci/opendistro/elasticsearch.yml deleted file mode 100644 index 50b15470..00000000 --- a/.ci/opendistro/elasticsearch.yml +++ /dev/null @@ -1,2 +0,0 @@ -cluster.name: "docker-cluster" -network.host: 0.0.0.0 diff --git a/.ci/run-tests b/.ci/run-tests index 171daa7f..9b606485 100755 --- a/.ci/run-tests +++ b/.ci/run-tests @@ -6,9 +6,9 @@ export TEST_SUITE="${TEST_SUITE:=oss}" export PYTHON_VERSION="${PYTHON_VERSION:=3.9}" export PYTHON_CONNECTION_CLASS="${PYTHON_CONNECTION_CLASS:=Urllib3HttpConnection}" -export CLUSTER="${1:-opensearch}" -export SECURE_INTEGRATION="${2:-false}" -export OPENSEARCH_VERSION="${3:-latest}" +export CLUSTER="${CLUSTER:-opensearch}" +export SECURE_INTEGRATION="${1:-false}" +export OPENSEARCH_VERSION="${2:-latest}" if [[ "$SECURE_INTEGRATION" == "true" ]]; then export OPENSEARCH_URL_EXTENSION="https" else diff --git a/.github/workflows/integration-unreleased.yml b/.github/workflows/integration-unreleased.yml index 69b30775..4a963f4e 100644 --- a/.github/workflows/integration-unreleased.yml +++ b/.github/workflows/integration-unreleased.yml @@ -32,4 +32,4 @@ jobs: uses: actions/checkout@v2 - name: Run Integration Test - run: "./.ci/run-tests opensearch false SNAPSHOT" \ No newline at end of file + run: "./.ci/run-tests false SNAPSHOT" \ No newline at end of file diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 55a9e589..e4a59fef 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -9,7 +9,6 @@ jobs: strategy: fail-fast: false matrix: - cluster: ["opensearch"] secured: ["true", "false"] entry: - { opensearch_version: 1.0.0 } @@ -30,5 +29,5 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Integ ${{ matrix.cluster }} secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}} - run: "./.ci/run-tests ${{ matrix.cluster }} ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}" \ No newline at end of file + - name: Integ OpenSearch secured=${{ matrix.secured }} version=${{matrix.entry.opensearch_version}} + run: "./.ci/run-tests ${{ matrix.secured }} ${{ matrix.entry.opensearch_version }}" \ No newline at end of file diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 0ec53e47..1d8c1c3d 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -23,12 +23,11 @@ $ nox -rs test To run the integration tests locally, run: ``` -./.ci/run-tests opensearch true 1.3.0 +./.ci/run-tests true 1.3.0 ``` -The first argument, `opensearch` tells the server type to run integration test against. Valid values are `opensearch` and `opendistro`. -The second argument tells whether to run server with security plugin enabled or not. -The third argument specifies the version of OpenSearch the tests should run against, if not specified, the tests run against the latest version. This argument is ignored if the server type is `opendistro`. +The first argument tells whether to run server with security plugin enabled or not. +The second argument specifies the version of OpenSearch the tests should run against, if not specified, the tests run against the latest version. Note that integration tests require docker to be installed and running, and downloads quite a bit of data from over the internet and hence take few minutes to complete.