diff --git a/.github/workflows/test-compatibility.yml b/.github/workflows/test-compatibility.yml index 50c4a3f22..da7ee32ad 100644 --- a/.github/workflows/test-compatibility.yml +++ b/.github/workflows/test-compatibility.yml @@ -55,7 +55,7 @@ jobs: run: | export OPENSEARCH_VERSION=${{ matrix.entry.opensearch_version }} export SECURE_INTEGRATION=${{ matrix.secured }} - make cluster.get-cert test-integ race=true + make cluster.get-cert test-integ-core test-integ-plugins race=true - name: Stop the OpenSearch cluster run: | diff --git a/.github/workflows/test-integration-unreleased.yml b/.github/workflows/test-integration-unreleased.yml index 7925cf872..9b0c59d06 100644 --- a/.github/workflows/test-integration-unreleased.yml +++ b/.github/workflows/test-integration-unreleased.yml @@ -65,7 +65,7 @@ jobs: - name: Integration test working-directory: go-client - run: make test-integ race=true unreleased=true + run: make test-integ-core race=true env: OPENSEARCH_GO_SKIP_JSON_COMPARE: true diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 2862b8fd1..361ebb83f 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -26,7 +26,7 @@ jobs: for attempt in `seq 25`; do sleep 5; \ if curl -s localhost:9200; \ then echo '=====> ready'; break; fi; if [ $attempt == 25 ]; then exit 1; fi; echo '=====> waiting...'; done - - run: make test-integ race=true + - run: make test-integ-core test-integ-plugins race=true secured: name: Tests against secure cluster @@ -50,7 +50,7 @@ jobs: for attempt in `seq 25`; do sleep 5; \ if curl -s -ku admin:myStrongPassword123! https://localhost:9200; \ then echo '=====> ready'; break; fi; if [ $attempt == 25 ]; then exit 1; fi; echo '=====> waiting...'; done - - run: make cluster.get-cert test-integ-secure race=true coverage=true + - run: make cluster.get-cert test-integ-core test-integ-plugins race=true coverage=true - uses: codecov/codecov-action@v4 with: file: tmp/integ.cov diff --git a/CHANGELOG.md b/CHANGELOG.md index 91addb79d..b1d3437e8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Adjust workflows to work with security plugin ([#507](https://github.com/opensearch-project/opensearch-go/pull/507)) - Updates USER_GUIDE.md and /_samples/ ([#518](https://github.com/opensearch-project/opensearch-go/pull/518)) - Updates opensearchtransport.Client to use pooled gzip writer and buffer ([#521](https://github.com/opensearch-project/opensearch-go/pull/521)) +- Use go:build tags for testing ([#52?](https://github.com/opensearch-project/opensearch-go/pull/52?)) ### Deprecated @@ -200,4 +201,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [2.1.0]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.1...v2.1.0 [2.0.1]: https://github.com/opensearch-project/opensearch-go/compare/v2.0.0...v2.0.1 [2.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.1.0...v2.0.0 -[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0 \ No newline at end of file +[1.0.0]: https://github.com/opensearch-project/opensearch-go/compare/v1.0.0...v1.1.0 diff --git a/Makefile b/Makefile index 665053417..5e1c193d3 100644 --- a/Makefile +++ b/Makefile @@ -21,18 +21,14 @@ test: test-unit test-integ: ## Run integration tests @printf "\033[2m→ Running integration tests...\033[0m\n" - $(eval testintegtags += "integration") - $(eval testintegpath = "./...") + $(eval testintegtags += "integration,core,plugins") ifdef multinode $(eval testintegtags += "multinode") endif ifdef race $(eval testintegargs += "-race") endif -ifdef unreleased - $(eval testintegpath = "./opensearchapi/...") -endif - $(eval testintegargs += "-cover" "-tags=$(testintegtags)" "-timeout=1h" "$(testintegpath)" "-args" "-test.gocoverdir=$(PWD)/tmp/integration") + $(eval testintegargs += "-cover" "-tags=$(testintegtags)" "-timeout=1h" "./..." "-args" "-test.gocoverdir=$(PWD)/tmp/integration") @mkdir -p $(PWD)/tmp/integration @echo "go test -v" $(testintegargs); \ go test -v $(testintegargs); @@ -40,9 +36,22 @@ ifdef coverage @go tool covdata textfmt -i=$(PWD)/tmp/integration -o $(PWD)/tmp/integ.cov endif +test-integ-core: ## Run base integration tests + @make test-integ testintegtags=integration,core + +test-integ-plugins: ## Run plugin integration tests + @make test-integ testintegtags=integration,plugins + test-integ-secure: ##Run secure integration tests @SECURE_INTEGRATION=true make test-integ +test-integ-core-secure: ## Run secure base integration tests + @SECURE_INTEGRATION=true make test-integ testintegtags=integration,core + +test-integ-plugins-secure: ## Run secure plugin integration tests + @SECURE_INTEGRATION=true make test-integ testintegtags=integration,plugins + + test-bench: ## Run benchmarks @printf "\033[2m→ Running benchmarks...\033[0m\n" go test -run=none -bench=. -benchmem ./... diff --git a/opensearch_integration_test.go b/opensearch_integration_test.go index eea817e86..1764a71e6 100644 --- a/opensearch_integration_test.go +++ b/opensearch_integration_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration && !multinode +//go:build integration && core && !multinode package opensearch_test diff --git a/opensearch_secure_integration_test.go b/opensearch_secure_integration_test.go deleted file mode 100644 index 74f3a04bf..000000000 --- a/opensearch_secure_integration_test.go +++ /dev/null @@ -1,52 +0,0 @@ -// SPDX-License-Identifier: Apache-2.0 -// -// The OpenSearch Contributors require contributions made to -// this file be licensed under the Apache-2.0 license or a -// compatible open source license. -// -// Modifications Copyright OpenSearch Contributors. See -// GitHub history for details. - -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -//go:build integration - -package opensearch_test - -import ( - "context" - "log" - "testing" - - "github.com/stretchr/testify/assert" - - ostest "github.com/opensearch-project/opensearch-go/v3/internal/test" -) - -func TestSecuredClientAPI(t *testing.T) { - t.Run("Check Info", func(t *testing.T) { - ctx := context.Background() - client, err := ostest.NewClient() - if err != nil { - log.Fatalf("Error creating the client: %s\n", err) - } - res, err := client.Info(ctx, nil) - if err != nil { - log.Fatalf("Error getting the response: %s\n", err) - } - - assert.True(t, len(res.Version.Number) > 0, "version number should not be empty") - assert.True(t, len(res.Tagline) > 0, "tagline should not be empty") - assert.True(t, len(res.Version.Distribution) > 0, "distribution should not be empty") - }) -} diff --git a/opensearchapi/api_aliases_test.go b/opensearchapi/api_aliases_test.go index 62f55a977..8ae62c853 100644 --- a/opensearchapi/api_aliases_test.go +++ b/opensearchapi/api_aliases_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_bulk_test.go b/opensearchapi/api_bulk_test.go index e56617299..5c3373791 100644 --- a/opensearchapi/api_bulk_test.go +++ b/opensearchapi/api_bulk_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_cat_test.go b/opensearchapi/api_cat_test.go index e1b3b9665..716fbfcf9 100644 --- a/opensearchapi/api_cat_test.go +++ b/opensearchapi/api_cat_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_cluster_test.go b/opensearchapi/api_cluster_test.go index 38ff6a51d..7c32d4920 100644 --- a/opensearchapi/api_cluster_test.go +++ b/opensearchapi/api_cluster_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_component_template_test.go b/opensearchapi/api_component_template_test.go index 0a7c36b03..c35a417d2 100644 --- a/opensearchapi/api_component_template_test.go +++ b/opensearchapi/api_component_template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_dangling_test.go b/opensearchapi/api_dangling_test.go index 58f088ad8..651a294b8 100644 --- a/opensearchapi/api_dangling_test.go +++ b/opensearchapi/api_dangling_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_datastream_test.go b/opensearchapi/api_datastream_test.go index 35858d7ce..3ea273906 100644 --- a/opensearchapi/api_datastream_test.go +++ b/opensearchapi/api_datastream_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_document_test.go b/opensearchapi/api_document_test.go index f924fcdea..77dac2570 100644 --- a/opensearchapi/api_document_test.go +++ b/opensearchapi/api_document_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_index_template_test.go b/opensearchapi/api_index_template_test.go index defc13ed3..731197e53 100644 --- a/opensearchapi/api_index_template_test.go +++ b/opensearchapi/api_index_template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_index_test.go b/opensearchapi/api_index_test.go index 5a984e30c..611f62674 100644 --- a/opensearchapi/api_index_test.go +++ b/opensearchapi/api_index_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_indices_test.go b/opensearchapi/api_indices_test.go index eaeedd7cd..55cd6ac7e 100644 --- a/opensearchapi/api_indices_test.go +++ b/opensearchapi/api_indices_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_info_test.go b/opensearchapi/api_info_test.go index ee5eeebea..90aaa4aa3 100644 --- a/opensearchapi/api_info_test.go +++ b/opensearchapi/api_info_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_ingest_test.go b/opensearchapi/api_ingest_test.go index bd94c0863..63175962c 100644 --- a/opensearchapi/api_ingest_test.go +++ b/opensearchapi/api_ingest_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_mget_test.go b/opensearchapi/api_mget_test.go index 9da753b2a..64e380d65 100644 --- a/opensearchapi/api_mget_test.go +++ b/opensearchapi/api_mget_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_msearch-template_test.go b/opensearchapi/api_msearch-template_test.go index 7765aa2c1..a968278ba 100644 --- a/opensearchapi/api_msearch-template_test.go +++ b/opensearchapi/api_msearch-template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_msearch_test.go b/opensearchapi/api_msearch_test.go index 010819e84..ddd7ee386 100644 --- a/opensearchapi/api_msearch_test.go +++ b/opensearchapi/api_msearch_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_mtermvectors_test.go b/opensearchapi/api_mtermvectors_test.go index 925e8b7a6..2d4b91a98 100644 --- a/opensearchapi/api_mtermvectors_test.go +++ b/opensearchapi/api_mtermvectors_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_nodes_test.go b/opensearchapi/api_nodes_test.go index 6fc1e1a05..bbd2ea15a 100644 --- a/opensearchapi/api_nodes_test.go +++ b/opensearchapi/api_nodes_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_ping_test.go b/opensearchapi/api_ping_test.go index 8b39535c2..a766611e0 100644 --- a/opensearchapi/api_ping_test.go +++ b/opensearchapi/api_ping_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_point_in_time_test.go b/opensearchapi/api_point_in_time_test.go index b4d478fae..38e30d785 100644 --- a/opensearchapi/api_point_in_time_test.go +++ b/opensearchapi/api_point_in_time_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_rank_eval_test.go b/opensearchapi/api_rank_eval_test.go index 20d648bcf..5e1795f6b 100644 --- a/opensearchapi/api_rank_eval_test.go +++ b/opensearchapi/api_rank_eval_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_reindex_rethrottle_test.go b/opensearchapi/api_reindex_rethrottle_test.go index 7453c6d25..7409f287a 100644 --- a/opensearchapi/api_reindex_rethrottle_test.go +++ b/opensearchapi/api_reindex_rethrottle_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_reindex_test.go b/opensearchapi/api_reindex_test.go index 321040dc7..70d40334f 100644 --- a/opensearchapi/api_reindex_test.go +++ b/opensearchapi/api_reindex_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_render_search_template_test.go b/opensearchapi/api_render_search_template_test.go index 734db44ba..f35dd3a28 100644 --- a/opensearchapi/api_render_search_template_test.go +++ b/opensearchapi/api_render_search_template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_script_test.go b/opensearchapi/api_script_test.go index 3f9d0e8d4..d8dc62162 100644 --- a/opensearchapi/api_script_test.go +++ b/opensearchapi/api_script_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_scroll_test.go b/opensearchapi/api_scroll_test.go index 58e46e35b..12aa23df0 100644 --- a/opensearchapi/api_scroll_test.go +++ b/opensearchapi/api_scroll_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_search-template_test.go b/opensearchapi/api_search-template_test.go index c2174c6b0..c56b12e18 100644 --- a/opensearchapi/api_search-template_test.go +++ b/opensearchapi/api_search-template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_search_shards_test.go b/opensearchapi/api_search_shards_test.go index b4f9a31b0..eae739612 100644 --- a/opensearchapi/api_search_shards_test.go +++ b/opensearchapi/api_search_shards_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_search_test.go b/opensearchapi/api_search_test.go index c97db1835..a00de3b5b 100644 --- a/opensearchapi/api_search_test.go +++ b/opensearchapi/api_search_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_snapshot_test.go b/opensearchapi/api_snapshot_test.go index c381ddaff..c835b4ed5 100644 --- a/opensearchapi/api_snapshot_test.go +++ b/opensearchapi/api_snapshot_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_tasks_test.go b/opensearchapi/api_tasks_test.go index 1a3a663ab..7cea4444f 100644 --- a/opensearchapi/api_tasks_test.go +++ b/opensearchapi/api_tasks_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_template_test.go b/opensearchapi/api_template_test.go index 4b995ad05..693e97344 100644 --- a/opensearchapi/api_template_test.go +++ b/opensearchapi/api_template_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_termvectors_test.go b/opensearchapi/api_termvectors_test.go index b95b07602..0052faae0 100644 --- a/opensearchapi/api_termvectors_test.go +++ b/opensearchapi/api_termvectors_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_update_by_query_rethrottle_test.go b/opensearchapi/api_update_by_query_rethrottle_test.go index 6a6491a9e..58ae60f97 100644 --- a/opensearchapi/api_update_by_query_rethrottle_test.go +++ b/opensearchapi/api_update_by_query_rethrottle_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_update_by_query_test.go b/opensearchapi/api_update_by_query_test.go index a2dd56de2..3b6c081bb 100644 --- a/opensearchapi/api_update_by_query_test.go +++ b/opensearchapi/api_update_by_query_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchapi/api_update_test.go b/opensearchapi/api_update_test.go index e13181b98..e2fb72e2a 100644 --- a/opensearchapi/api_update_test.go +++ b/opensearchapi/api_update_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (core || opensearchapi) package opensearchapi_test diff --git a/opensearchtransport/connection_integration_test.go b/opensearchtransport/connection_integration_test.go index b657a55ce..b67b0b32b 100644 --- a/opensearchtransport/connection_integration_test.go +++ b/opensearchtransport/connection_integration_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration +//go:build integration && (core || opensearchtransport) package opensearchtransport diff --git a/opensearchtransport/opensearchtransport_integration_multinode_test.go b/opensearchtransport/opensearchtransport_integration_multinode_test.go index cc159f587..36c6c387c 100644 --- a/opensearchtransport/opensearchtransport_integration_multinode_test.go +++ b/opensearchtransport/opensearchtransport_integration_multinode_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration && multinode +//go:build integration && (core || opensearchtransport) && multinode package opensearchtransport_test diff --git a/opensearchtransport/opensearchtransport_integration_test.go b/opensearchtransport/opensearchtransport_integration_test.go index 8a7e51419..9e878b1e7 100644 --- a/opensearchtransport/opensearchtransport_integration_test.go +++ b/opensearchtransport/opensearchtransport_integration_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration +//go:build integration && (core || opensearchtransport) package opensearchtransport_test diff --git a/opensearchutil/bulk_indexer_integration_test.go b/opensearchutil/bulk_indexer_integration_test.go index 2facb546a..ef74f1b69 100644 --- a/opensearchutil/bulk_indexer_integration_test.go +++ b/opensearchutil/bulk_indexer_integration_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration +//go:build integration && (core || opensearchutil) package opensearchutil_test diff --git a/opensearchutil/json_reader_integration_test.go b/opensearchutil/json_reader_integration_test.go index f126cd3b3..c7bcd8d61 100644 --- a/opensearchutil/json_reader_integration_test.go +++ b/opensearchutil/json_reader_integration_test.go @@ -24,7 +24,7 @@ // specific language governing permissions and limitations // under the License. -//go:build integration +//go:build integration && (core || opensearchutil) package opensearchutil_test diff --git a/plugins/ism/api_policies_test.go b/plugins/ism/api_policies_test.go index ce4051454..2fd030a40 100644 --- a/plugins/ism/api_policies_test.go +++ b/plugins/ism/api_policies_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_index_management) package ism_test diff --git a/plugins/ism/api_test.go b/plugins/ism/api_test.go index c16d375f9..77c5cb9f1 100644 --- a/plugins/ism/api_test.go +++ b/plugins/ism/api_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_index_management) package ism_test diff --git a/plugins/security/api_account_test.go b/plugins/security/api_account_test.go index d336d388c..f4607e972 100644 --- a/plugins/security/api_account_test.go +++ b/plugins/security/api_account_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_actiongroups_test.go b/plugins/security/api_actiongroups_test.go index ac6a5a8ac..5aee2431a 100644 --- a/plugins/security/api_actiongroups_test.go +++ b/plugins/security/api_actiongroups_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_audit_test.go b/plugins/security/api_audit_test.go index 72adece18..1dcbbfca4 100644 --- a/plugins/security/api_audit_test.go +++ b/plugins/security/api_audit_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_flushcache_test.go b/plugins/security/api_flushcache_test.go index 0e23f7765..7fcd47a75 100644 --- a/plugins/security/api_flushcache_test.go +++ b/plugins/security/api_flushcache_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_health_test.go b/plugins/security/api_health_test.go index 6613a2f37..859edeab6 100644 --- a/plugins/security/api_health_test.go +++ b/plugins/security/api_health_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_internalusers_test.go b/plugins/security/api_internalusers_test.go index 941aa433f..40af5a596 100644 --- a/plugins/security/api_internalusers_test.go +++ b/plugins/security/api_internalusers_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_nodesdn_test.go b/plugins/security/api_nodesdn_test.go index b3662c12f..e289f4234 100644 --- a/plugins/security/api_nodesdn_test.go +++ b/plugins/security/api_nodesdn_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_roles_test.go b/plugins/security/api_roles_test.go index 3fe4628d1..46d1fd60d 100644 --- a/plugins/security/api_roles_test.go +++ b/plugins/security/api_roles_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_rolesmapping_test.go b/plugins/security/api_rolesmapping_test.go index 1c895c488..ebd3787b6 100644 --- a/plugins/security/api_rolesmapping_test.go +++ b/plugins/security/api_rolesmapping_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_securityconfig_test.go b/plugins/security/api_securityconfig_test.go index 29a745016..1f971afe4 100644 --- a/plugins/security/api_securityconfig_test.go +++ b/plugins/security/api_securityconfig_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_ssl_test.go b/plugins/security/api_ssl_test.go index 07af43f47..d424d74c8 100644 --- a/plugins/security/api_ssl_test.go +++ b/plugins/security/api_ssl_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/plugins/security/api_tenants_test.go b/plugins/security/api_tenants_test.go index f4787a5b9..a045f170f 100644 --- a/plugins/security/api_tenants_test.go +++ b/plugins/security/api_tenants_test.go @@ -4,7 +4,7 @@ // this file be licensed under the Apache-2.0 license or a // compatible open source license. // -//go:build integration +//go:build integration && (plugins || plugin_security) package security_test diff --git a/signer/aws/aws_test.go b/signer/aws/aws_test.go index 3368f576b..311b388e2 100644 --- a/signer/aws/aws_test.go +++ b/signer/aws/aws_test.go @@ -6,6 +6,8 @@ // // Modifications Copyright OpenSearch Contributors. See // GitHub history for details. +// +//go:build !integration package aws_test diff --git a/signer/awsv2/sdkv2signer_test.go b/signer/awsv2/sdkv2signer_test.go index c181ccbed..1b65f04da 100644 --- a/signer/awsv2/sdkv2signer_test.go +++ b/signer/awsv2/sdkv2signer_test.go @@ -6,6 +6,8 @@ // // Modifications Copyright OpenSearch Contributors. See // GitHub history for details. +// +//go:build !integration package awsv2_test