From 490a2c57b07db4c89a894679771d33117ec192ee Mon Sep 17 00:00:00 2001 From: Seebs Date: Mon, 14 Nov 2022 16:52:01 -0600 Subject: [PATCH] stop uploading test results to sonarcloud, stop telling it we did This gets complicated. For coverage output, sonarcloud supports wildcards. For test output, it doesn't. So we weren't getting meaningful results, just weird error messages. I fixed that, and got thousands of lines of other error messages because it wasn't finding the test source files. That looked like this: WARN: Failed to find test file for package github.com/molecula/featurebase/v3 and test TestTranslation_Primary But we don't actually need the test reports sent to SonarCloud, because "which parts of your test suite are being run" is sort of inherently "basically all of them" with go test. So rather than continuing to do that, we drop it. Since we're dropping that, we don't need the JSON output from go test anymore, so we drop that too, and the tee commands, and the "artifacts" from the tee commands, and now our test output is human-readable and slightly faster. We also bump SonarCloud to 4.7. We also fix the tests to use GOVERSION sometimes and GOFUTURE other times, and bump from 1.19.2 to 1.19.3. Also a couple of minor cleanup (adding explanatory comments, combining adjacent grep commands, etc.) (cherry picked from commit da4fb4ab4ea3f36fe0da867219e3103e56cab7cf) --- batch/Makefile | 2 +- idk/Makefile | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/batch/Makefile b/batch/Makefile index 0329794d3..91ae896e7 100644 --- a/batch/Makefile +++ b/batch/Makefile @@ -41,4 +41,4 @@ test-run-local: TPKG ?= ../... test-run: vendor $(DOCKER_COMPOSE) build batch-test - $(DOCKER_COMPOSE) run -T batch-test bash -c "set -o pipefail; go test -v -mod=vendor -tags=odbc,dynamic ./... -covermode=atomic -coverpkg=$(TPKG) -json -coverprofile=/testdata/$(PROJECT)_base_coverage.out | tee /testdata/$(PROJECT)_report.out" + $(DOCKER_COMPOSE) run -T batch-test bash -c "set -o pipefail; go test -v -mod=vendor -tags=odbc,dynamic $(TPKG) -covermode=atomic -coverpkg=$(TPKG) -coverprofile=/testdata/$(PROJECT)_base_coverage.out" diff --git a/idk/Makefile b/idk/Makefile index 23c3c4172..17c9dab64 100644 --- a/idk/Makefile +++ b/idk/Makefile @@ -223,17 +223,17 @@ test-run-local: vendor TPKG ?= ./... test-run: testenv vendor $(DOCKER_COMPOSE) build idk-test - $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v -mod=vendor -tags=odbc,dynamic $(TPKG) -covermode=atomic -coverpkg=$(TPKG) -json -coverprofile=/testdata/$(PROJECT)_coverage.out | tee /testdata/$(PROJECT)_report.out" - $(DOCKER_COMPOSE) run -T idk-test /go/src/github.com/featurebasedb/featurebase/idk/reingest_test.sh + $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v -mod=vendor -tags=odbc,dynamic $(TPKG) -covermode=atomic -coverpkg=$(TPKG) -coverprofile=/testdata/$(PROJECT)_base_coverage.out" + $(DOCKER_COMPOSE) run -T idk-test /go/src/github.com/molecula/featurebase/idk/reingest_test.sh test-run-race: testenv vendor $(DOCKER_COMPOSE) build idk-test - $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v -mod=vendor -race -covermode=atomic -tags=dynamic $(TPKG) -coverpkg=$(TPKG) -timeout=30m -json -coverprofile=/testdata/$(PROJECT)_race_coverage.out | tee /testdata/$(PROJECT)_report.out" + $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v -mod=vendor -race -covermode=atomic -tags=dynamic $(TPKG) -coverpkg=$(TPKG) -timeout=30m -coverprofile=/testdata/$(PROJECT)_race_coverage.out" test-run-kafka-sasl: testenv vendor $(DOCKER_COMPOSE) build idk-test - $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v --tags=kafka_sasl -mod=vendor -race -timeout=30m $(TPKG) -covermode=atomic -coverpkg=$(TPKG) -json -coverprofile=/testdata/$(PROJECT)_sasl_coverage.out | tee /testdata/$(PROJECT)_report.out" + $(DOCKER_COMPOSE) run -T idk-test bash -c "set -o pipefail; go test -v --tags=kafka_sasl -mod=vendor -race -timeout=30m $(TPKG) -covermode=atomic -coverpkg=$(TPKG) -coverprofile=/testdata/$(PROJECT)_sasl_coverage.out" testenv: testenv/certs