From a2b2f856e07bd0abbdc83fc8ca392513d4d81deb Mon Sep 17 00:00:00 2001 From: Jannis Mattheis Date: Sat, 16 Sep 2023 20:44:09 +0200 Subject: [PATCH] test: don't run tests twice --- Makefile | 7 ++----- auth/authentication_test.go | 3 --- auth/password/password_test.go | 3 --- plugin/manager_test.go | 3 +-- 4 files changed, 3 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 0fa0f04..8b616bf 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ DOCKER_RUN=docker run --rm -v "$$PWD/.:${DOCKER_WORKDIR}" -v "`go env GOPATH`/pk DOCKER_GO_BUILD=go build -mod=readonly -a -installsuffix cgo -ldflags "$$LD_FLAGS" NODE_OPTIONS=$(shell if node --help | grep -q -- "--openssl-legacy-provider"; then echo --openssl-legacy-provider; fi) -test: test-coverage test-race test-js +test: test-coverage test-js check: check-go check-swagger check-js check-ci: check-swagger check-js @@ -17,11 +17,8 @@ require-version: if [ -n ${VERSION} ] && [[ $$VERSION == "v"* ]]; then echo "The version may not start with v" && exit 1; fi if [ -z ${VERSION} ]; then echo "Need to set VERSION" && exit 1; fi; -test-race: - go test -race ./... - test-coverage: - go test -coverprofile=coverage.txt -covermode=atomic ./... + go test --race -coverprofile=coverage.txt -covermode=atomic ./... format: goimports -w $(shell find . -type f -name '*.go' -not -path "./vendor/*") diff --git a/auth/authentication_test.go b/auth/authentication_test.go index 374f63d..9d3a626 100644 --- a/auth/authentication_test.go +++ b/auth/authentication_test.go @@ -1,6 +1,3 @@ -//go:build !race -// +build !race - package auth import ( diff --git a/auth/password/password_test.go b/auth/password/password_test.go index a9e343a..738c7a1 100644 --- a/auth/password/password_test.go +++ b/auth/password/password_test.go @@ -1,6 +1,3 @@ -//go:build !race -// +build !race - package password import ( diff --git a/plugin/manager_test.go b/plugin/manager_test.go index 8aee16b..3bc312b 100644 --- a/plugin/manager_test.go +++ b/plugin/manager_test.go @@ -1,6 +1,5 @@ -//go:build (linux || darwin) && !race +//go:build linux || darwin // +build linux darwin -// +build !race package plugin