From 33b15734edb65cbd861832030790768883f8ede4 Mon Sep 17 00:00:00 2001 From: Curtis Robert Date: Thu, 2 May 2024 14:51:58 -0700 Subject: [PATCH] [chore][CI/CD] Remove integration test naming restriction (#32529) Including the `-run=Integration` argument in the `make` command means that only integration tests that include `Integration` in their name will be run. This requirement is not obvious to users, so there are currently around 15 integration tests that aren't being run because they don't conform to this requirement. I think the best approach here is to remove the `-run` argument (rather than rename tests) so that this doesn't happen again. Resolves https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32207 --------- Co-authored-by: Antoine Toulme Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com> Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com> --- Makefile.Common | 2 +- .../clickhouseexporter/integration_test.go | 25 ++++++++++--------- .../logs_exporter_stress_test.go | 2 ++ .../hostmetricsreceiver/integration_test.go | 6 +++++ .../alerts_integration_test.go | 2 +- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/Makefile.Common b/Makefile.Common index a490595d6c27e..6b54df6b6720d 100644 --- a/Makefile.Common +++ b/Makefile.Common @@ -29,7 +29,7 @@ GOTEST_TIMEOUT?= 600s GOTEST_OPT?= -race -timeout $(GOTEST_TIMEOUT) -parallel 4 --tags=$(GO_BUILD_TAGS) GOTEST_INTEGRATION_OPT?= -race -timeout 360s -parallel 4 GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic -GOTEST_OPT_WITH_INTEGRATION=$(GOTEST_INTEGRATION_OPT) -tags=integration,$(GO_BUILD_TAGS) -run=Integration +GOTEST_OPT_WITH_INTEGRATION=$(GOTEST_INTEGRATION_OPT) -tags=integration,$(GO_BUILD_TAGS) GOTEST_OPT_WITH_INTEGRATION_COVERAGE=$(GOTEST_OPT_WITH_INTEGRATION) -coverprofile=integration-coverage.txt -covermode=atomic GOCMD?= go GOOS=$(shell $(GOCMD) env GOOS) diff --git a/exporter/clickhouseexporter/integration_test.go b/exporter/clickhouseexporter/integration_test.go index 1c1796251ccc9..c36f3d1098068 100644 --- a/exporter/clickhouseexporter/integration_test.go +++ b/exporter/clickhouseexporter/integration_test.go @@ -26,18 +26,19 @@ func TestIntegration(t *testing.T) { name string image string }{ - { - name: "test clickhouse 24-alpine", - image: "clickhouse/clickhouse-server:24-alpine", - }, - { - name: "test clickhouse 23-alpine", - image: "clickhouse/clickhouse-server:23-alpine", - }, - { - name: "test clickhouse 22-alpine", - image: "clickhouse/clickhouse-server:22-alpine", - }, + // TODO: Skipping due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32530 + // { + // name: "test clickhouse 24-alpine", + // image: "clickhouse/clickhouse-server:24-alpine", + // }, + // { + // name: "test clickhouse 23-alpine", + // image: "clickhouse/clickhouse-server:23-alpine", + // }, + // { + // name: "test clickhouse 22-alpine", + // image: "clickhouse/clickhouse-server:22-alpine", + // }, } for _, c := range testCase { diff --git a/exporter/datasetexporter/logs_exporter_stress_test.go b/exporter/datasetexporter/logs_exporter_stress_test.go index f023cdb02a999..d9fb02ef96505 100644 --- a/exporter/datasetexporter/logs_exporter_stress_test.go +++ b/exporter/datasetexporter/logs_exporter_stress_test.go @@ -28,6 +28,8 @@ import ( ) func TestConsumeLogsManyLogsShouldSucceed(t *testing.T) { + t.Skip("TODO: Skipping due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32533") + const maxDelay = 200 * time.Millisecond createSettings := exportertest.NewNopCreateSettings() diff --git a/receiver/hostmetricsreceiver/integration_test.go b/receiver/hostmetricsreceiver/integration_test.go index bfa4e4c33ad0a..303223f471943 100644 --- a/receiver/hostmetricsreceiver/integration_test.go +++ b/receiver/hostmetricsreceiver/integration_test.go @@ -22,6 +22,8 @@ import ( ) func Test_ProcessScrape(t *testing.T) { + t.Skip("TODO: Skipping for now due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32536") + expectedFile := filepath.Join("testdata", "e2e", "expected_process.yaml") cmd := exec.Command("/bin/sleep", "300") require.NoError(t, cmd.Start()) @@ -57,6 +59,8 @@ func Test_ProcessScrape(t *testing.T) { } func Test_ProcessScrapeWithCustomRootPath(t *testing.T) { + t.Skip("TODO: Skipping for now due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32536") + expectedFile := filepath.Join("testdata", "e2e", "expected_process_separate_proc.yaml") scraperinttest.NewIntegrationTest( @@ -88,6 +92,8 @@ func Test_ProcessScrapeWithCustomRootPath(t *testing.T) { } func Test_ProcessScrapeWithBadRootPathAndEnvVar(t *testing.T) { + t.Skip("TODO: Skipping for now due to https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32536") + expectedFile := filepath.Join("testdata", "e2e", "expected_process_separate_proc.yaml") t.Setenv("HOST_PROC", filepath.Join("testdata", "e2e", "proc")) scraperinttest.NewIntegrationTest( diff --git a/receiver/mongodbatlasreceiver/alerts_integration_test.go b/receiver/mongodbatlasreceiver/alerts_integration_test.go index 09196275620d1..681c146bc8c4b 100644 --- a/receiver/mongodbatlasreceiver/alerts_integration_test.go +++ b/receiver/mongodbatlasreceiver/alerts_integration_test.go @@ -110,7 +110,7 @@ func TestAlertsReceiver(t *testing.T) { } func TestAlertsReceiverTLS(t *testing.T) { - t.Skip("Cert files are invalid. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32543") + t.Skip("TODO: Cert files are invalid. See https://github.com/open-telemetry/opentelemetry-collector-contrib/issues/32543") for _, payloadName := range testPayloads { t.Run(payloadName, func(t *testing.T) { testAddr := testutil.GetAvailableLocalAddress(t)