Skip to content

Commit

Permalink
[chore][CI/CD] Remove integration test naming restriction (#32529)
Browse files Browse the repository at this point in the history
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
#32207

---------

Co-authored-by: Antoine Toulme <antoine@toulme.name>
Co-authored-by: Tyler Helmuth <12352919+TylerHelmuth@users.noreply.github.com>
Co-authored-by: Alex Boten <223565+codeboten@users.noreply.github.com>
  • Loading branch information
4 people committed May 2, 2024
1 parent b82bb12 commit 33b1573
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile.Common
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
25 changes: 13 additions & 12 deletions exporter/clickhouseexporter/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 2 additions & 0 deletions exporter/datasetexporter/logs_exporter_stress_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
6 changes: 6 additions & 0 deletions receiver/hostmetricsreceiver/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion receiver/mongodbatlasreceiver/alerts_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 33b1573

Please sign in to comment.