From da225ecb9c243f50b9fe1d927e2ca9c3693daf9e Mon Sep 17 00:00:00 2001 From: Vacha Shah Date: Fri, 28 Oct 2022 10:45:27 -0700 Subject: [PATCH] Removing OpenDistro tests (#142) * Removing ODFE tests Signed-off-by: Vacha Shah * Addressing comments Signed-off-by: Vacha Shah * Fixing lint workflow Signed-off-by: Vacha Shah Signed-off-by: Vacha Shah --- .ci/opendistro/Dockerfile.opendistro | 8 -------- .ci/opendistro/docker-compose.yml | 17 ---------------- .github/workflows/lint.yml | 2 +- .github/workflows/test-compatibility.yml | 4 ++-- .github/workflows/test-integration.yml | 14 ++++--------- DEVELOPER_GUIDE.md | 4 ++-- Makefile | 26 ++++++------------------ 7 files changed, 15 insertions(+), 60 deletions(-) delete mode 100644 .ci/opendistro/Dockerfile.opendistro delete mode 100644 .ci/opendistro/docker-compose.yml diff --git a/.ci/opendistro/Dockerfile.opendistro b/.ci/opendistro/Dockerfile.opendistro deleted file mode 100644 index a0b0cdec2..000000000 --- a/.ci/opendistro/Dockerfile.opendistro +++ /dev/null @@ -1,8 +0,0 @@ -ARG OPENDISTRO_VERSION -FROM amazon/opendistro-for-elasticsearch:${OPENDISTRO_VERSION} - -ARG es_path=/usr/share/elasticsearch - -ARG SECURE_INTEGRATION -RUN if [ "$SECURE_INTEGRATION" != "true" ] ; then $es_path/bin/elasticsearch-plugin remove opendistro_security; fi - diff --git a/.ci/opendistro/docker-compose.yml b/.ci/opendistro/docker-compose.yml deleted file mode 100644 index 481dc0ad4..000000000 --- a/.ci/opendistro/docker-compose.yml +++ /dev/null @@ -1,17 +0,0 @@ -version: '3' - -services: - - elasticsearch: - build: - context: . - dockerfile: Dockerfile.opendistro - args: - - SECURE_INTEGRATION=${SECURE_INTEGRATION:-false} - - OPENDISTRO_VERSION=${OPENDISTRO_VERSION:-latest} - environment: - - discovery.type=single-node - - bootstrap.memory_lock=true - ports: - - "9200:9200" - user: elasticsearch diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index bb0f02b8e..b4a2bfc11 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: with: { fetch-depth: 1 } - uses: actions/setup-go@v2 with: - go-version: 1.16.2 + go-version: 1.17 - name: Install dependencies run: go get -u golang.org/x/lint/golint env: diff --git a/.github/workflows/test-compatibility.yml b/.github/workflows/test-compatibility.yml index 4ef90df01..7502d61da 100644 --- a/.github/workflows/test-compatibility.yml +++ b/.github/workflows/test-compatibility.yml @@ -45,7 +45,7 @@ jobs: run: | export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }} export SECURE_INTEGRATION=${{ matrix.secured }} - make cluster.clean cluster.opensearch.build cluster.opensearch.start + make cluster.clean cluster.build cluster.start - name: Integration test without security if: ${{ matrix.secured == 'false'}} @@ -57,4 +57,4 @@ jobs: - name: Stop the OpenSearch cluster run: | - make cluster.opensearch.stop + make cluster.stop diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index e5f6b0e77..e576c7029 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -15,9 +15,6 @@ jobs: test: name: Tests runs-on: ubuntu-latest - strategy: - matrix: - cluster: [ "opendistro" , "opensearch" ] steps: - uses: actions/checkout@v2 with: { fetch-depth: 1 } @@ -30,9 +27,9 @@ jobs: sudo sysctl -w vm.swappiness=1 sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 - - name: Launch ${{ matrix.cluster }} cluster + - name: Launch OpenSearch cluster run: | - make cluster.clean cluster.${{ matrix.cluster }}.build cluster.${{ matrix.cluster }}.start + make cluster.clean cluster.build cluster.start - run: make test-integ race=true - uses: codecov/codecov-action@v1 with: @@ -45,9 +42,6 @@ jobs: runs-on: ubuntu-latest env: SECURE_INTEGRATION: true - strategy: - matrix: - cluster: [ "opendistro" , "opensearch" ] steps: - uses: actions/checkout@v2 with: { fetch-depth: 1 } @@ -60,7 +54,7 @@ jobs: sudo sysctl -w vm.swappiness=1 sudo sysctl -w fs.file-max=262144 sudo sysctl -w vm.max_map_count=262144 - - name: Launch ${{ matrix.cluster }} cluster + - name: Launch OpenSearch cluster run: | - make cluster.clean cluster.${{ matrix.cluster }}.build cluster.${{ matrix.cluster }}.start + make cluster.clean cluster.build cluster.start - run: make test-integ-secure \ No newline at end of file diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index c47152d62..e762490e2 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -53,7 +53,7 @@ Hence, create all integration tests with build tag 'integration'. #### Execute integration tests from your terminal 1. Run below command to start containers. By default, it will launch latest OpenSearch cluster. ``` - make cluster.opensearch.build cluster.opensearch.start + make cluster.build cluster.start ``` 2. Run all integration tests. ``` @@ -61,7 +61,7 @@ Hence, create all integration tests with build tag 'integration'. ``` 3. Stop and clean containers. ``` - make cluster.opensearch.stop cluster.clean + make cluster.stop cluster.clean ``` ## Use an Editor diff --git a/Makefile b/Makefile index 2163f836e..2548e4a95 100644 --- a/Makefile +++ b/Makefile @@ -152,24 +152,14 @@ godoc: ## Display documentation for the package @printf "\n" godoc --http=localhost:6060 --play -cluster.opendistro.build: - docker-compose --project-directory .ci/opendistro build; - -cluster.opendistro.start: - docker-compose --project-directory .ci/opendistro up -d ; - sleep 20; - -cluster.opendistro.stop: - docker-compose --project-directory .ci/opendistro down ; - -cluster.opensearch.build: +cluster.build: docker-compose --project-directory .ci/opensearch build; -cluster.opensearch.start: +cluster.start: docker-compose --project-directory .ci/opensearch up -d ; sleep 20; -cluster.opensearch.stop: +cluster.stop: docker-compose --project-directory .ci/opensearch down ; @@ -193,14 +183,10 @@ workflow: ## Run all github workflow commands here sequentially # Benchmarks Test make test-bench # Integration Test -### OpenDistro - make cluster.clean cluster.opendistro.build cluster.opendistro.start - make test-integ race=true - make cluster.opendistro.stop ### OpenSearch - make cluster.clean cluster.opensearch.build cluster.opensearch.start + make cluster.clean cluster.build cluster.start make test-integ race=true - make cluster.opensearch.stop + make cluster.stop ##@ Other #------------------------------------------------------------------------------ @@ -209,4 +195,4 @@ help: ## Display help #------------- -------------- .DEFAULT_GOAL := help -.PHONY: help backport cluster cluster.opendistro.build cluster.opendistro.start cluster.opendistro.stop cluster.clean coverage godoc lint release test test-bench test-integ test-unit linters linters.install +.PHONY: help backport cluster cluster.clean coverage godoc lint release test test-bench test-integ test-unit linters linters.install