From c3908d8f4b54bab66e12a276b38649e796648e2c Mon Sep 17 00:00:00 2001 From: Sunil Shivanand Date: Thu, 19 Jan 2023 22:27:53 +0100 Subject: [PATCH] ci(test): increase timeout and add -race flag (#99) --- 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 27b8822b..cd007eac 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 00de3787..5e6b097e 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 2988521d..b90e2ace 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 )