From 4fe8529b6d62fafcf8423f5cf3b2ba9a9ecd46ef Mon Sep 17 00:00:00 2001 From: Sunil Shivanand Date: Thu, 19 Jan 2023 13:06:47 +0100 Subject: [PATCH] ci(test): increase timeout and add -race flag --- Makefile | 2 +- internal/controller/stas/scan_job_controller_test.go | 2 +- internal/controller/stas/workload_controller_test.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 27b8822b3..cd007eacc 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ vet: ## Run go vet against code. .PHONY: test test: manifests generate fmt vet envtest ## Run tests. - KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./... -coverprofile cover.out + KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test -race ./... -coverprofile cover.out test-reports: test ## Run tests and generate reports (no reports for now) diff --git a/internal/controller/stas/scan_job_controller_test.go b/internal/controller/stas/scan_job_controller_test.go index 00de37878..5e6b097e8 100644 --- a/internal/controller/stas/scan_job_controller_test.go +++ b/internal/controller/stas/scan_job_controller_test.go @@ -25,7 +25,7 @@ import ( var _ = Describe("Scan Job controller", func() { const ( - timeout = 20 * time.Second + timeout = 20 * time.Minute interval = 100 * time.Millisecond ) diff --git a/internal/controller/stas/workload_controller_test.go b/internal/controller/stas/workload_controller_test.go index 2988521d0..b90e2aced 100644 --- a/internal/controller/stas/workload_controller_test.go +++ b/internal/controller/stas/workload_controller_test.go @@ -22,7 +22,7 @@ type TestWorkloadFactory func(namespacedName types.NamespacedName, labels map[st var _ = Describe("Workload controller", func() { const ( - timeout = 20 * time.Second + timeout = 20 * time.Minute interval = 100 * time.Millisecond )