Skip to content

Commit 0dbbc93

Browse files
committed
Remove verbose flag from make test
Test logs are mainly useful either when developing/debugging tests or when the tests are failing. If some test fails, Go will automatically print the outputs from this tests. Printing all test logs all the time makes it much difficult to find which test is actually failing and which output belongs to it, so I suggest we don't use -v by default. Similar change has been made in CAPI a while ago: kubernetes-sigs/cluster-api#4187 Signed-off-by: Mateusz Gozdek <[email protected]>
1 parent d0b0e44 commit 0dbbc93

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,10 @@ e2e-image: docker-pull-prerequisites $(TOOLS_BIN_DIR)/start.sh $(TOOLS_BIN_DIR)/
368368

369369
.PHONY: test
370370
test: ## Run tests
371+
source ./scripts/fetch_ext_bins.sh; fetch_tools; setup_envs; go test ./...
372+
373+
.PHONY: test-verbose
374+
test-verbose: ## Run tests with verbose settings.
371375
source ./scripts/fetch_ext_bins.sh; fetch_tools; setup_envs; go test -v ./...
372376

373377
.PHONY: test-e2e ## Run e2e tests using clusterctl
@@ -388,7 +392,7 @@ test-conformance: generate-test-flavors $(GINKGO) $(KIND) $(SSM_PLUGIN) $(KUSTOM
388392

389393
.PHONY: test-cover
390394
test-cover: ## Run tests with code coverage and code generate reports
391-
source ./scripts/fetch_ext_bins.sh; fetch_tools; setup_envs; go test -v -coverprofile=coverage.out ./... $(TEST_ARGS)
395+
source ./scripts/fetch_ext_bins.sh; fetch_tools; setup_envs; go test -coverprofile=coverage.out ./... $(TEST_ARGS)
392396
go tool cover -func=coverage.out -o coverage.txt
393397
go tool cover -html=coverage.out -o coverage.html
394398

scripts/ci-test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ cd "${REPO_ROOT}" &&
2626
source ./scripts/fetch_ext_bins.sh &&
2727
fetch_tools &&
2828
setup_envs &&
29-
make lint test
29+
make lint test-verbose

0 commit comments

Comments
 (0)