diff --git a/Makefile b/Makefile index e7a0a65ab..cd54d4b9e 100644 --- a/Makefile +++ b/Makefile @@ -209,10 +209,15 @@ integration-tests-v2: $(ENVTEST) ## Run tests with reconciler V2 KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test --tags=integration_v2 github.com/DataDog/datadog-operator/internal/controller -coverprofile cover_integration_v2.out .PHONY: e2e-tests -e2e-tests: manifests $(KUSTOMIZE) ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`. +e2e-tests: ## Run E2E tests and destroy environment stacks after tests complete. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests`. cd test/e2e && go get github.com/DataDog/datadog-agent/test/new-e2e@9ebd4d1cebbe1c9141e3a6b54176fdea8a79dd91 cd $(ROOT) - KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e ./... -run TestAWSKindSuite -tags=!e2e -count=1 -v -timeout=0s -coverprofile cover_e2e.out + @if [ -z "$(E2E_RUN_REGEX)" ]; then \ + KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e/ ./... -count=1 --tags=e2e -v -run TestAWSKindSuite -timeout 0s -coverprofile cover_e2e.out; \ + else \ + echo "Running e2e test: $(E2E_RUN_REGEX)"; \ + KUBEBUILDER_ASSETS="$(ROOT)/bin/$(PLATFORM)/" go test -C test/e2e/ ./... -count=1 --tags=e2e -v -run $(E2E_RUN_REGEX) -timeout 0s -coverprofile cover_e2e.out; \ + fi .PHONY: e2e-tests-keep-stacks e2e-tests-keep-stacks: manifests $(KUSTOMIZE) ## Run E2E tests and keep environment stacks running. To run locally, complete pre-reqs (see docs/how-to-contribute.md) and prepend command with `aws-vault exec sso-agent-sandbox-account-admin --`. E.g. `aws-vault exec sso-agent-sandbox-account-admin -- make e2e-tests-keep-stacks`. diff --git a/test/e2e/tests/k8s_suite/k8s_suite_test.go b/test/e2e/tests/k8s_suite/k8s_suite_test.go index 81aefbcaa..936c92cde 100644 --- a/test/e2e/tests/k8s_suite/k8s_suite_test.go +++ b/test/e2e/tests/k8s_suite/k8s_suite_test.go @@ -8,6 +8,7 @@ package k8ssuite import ( "context" "fmt" + "github.com/DataDog/datadog-agent/test/fakeintake/aggregator" "github.com/DataDog/datadog-agent/test/fakeintake/client" "github.com/DataDog/datadog-agent/test/new-e2e/pkg/environments" @@ -128,7 +129,7 @@ func (s *k8sSuite) TestGenericK8s() { }) - s.T().Run("KSM check works (cluster check runner)", func(t *testing.T) { + s.T().Run("KSM check works cluster check runner", func(t *testing.T) { ddaConfigPath, err := common.GetAbsPath(filepath.Join(common.ManifestsPath, "datadog-agent-ccr-enabled.yaml")) assert.NoError(s.T(), err)