mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-08-25 23:07:32 +00:00
use -race for all units tests when running locally
Signed-off-by: Ryan Richard <richardry@vmware.com>
This commit is contained in:
+2
-8
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
||||
# Copyright 2020-2026 the Pinniped contributors. All Rights Reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
set -euo pipefail
|
||||
@@ -46,16 +46,10 @@ function main() {
|
||||
./hack/module.sh lint
|
||||
;;
|
||||
'unittest' | 'unittests' | 'units' | 'unit')
|
||||
# Temporarily avoid using the race detector for the impersonator package due to https://github.com/kubernetes/kubernetes/issues/128548
|
||||
KUBE_CACHE_MUTATION_DETECTOR=${kube_cache_mutation_detector} \
|
||||
KUBE_PANIC_WATCH_DECODE_ERROR=${kube_panic_watch_decode_error} \
|
||||
CGO_ENABLED=0 \
|
||||
go test -short -race $(go list ./... | grep -v internal/concierge/impersonator)
|
||||
# TODO: change this back to using the race detector everywhere
|
||||
KUBE_CACHE_MUTATION_DETECTOR=${kube_cache_mutation_detector} \
|
||||
KUBE_PANIC_WATCH_DECODE_ERROR=${kube_panic_watch_decode_error} \
|
||||
CGO_ENABLED=0 \
|
||||
go test -short ./internal/concierge/impersonator
|
||||
go test -short -race ./...
|
||||
;;
|
||||
'generate')
|
||||
go generate ./internal/mocks/...
|
||||
|
||||
Reference in New Issue
Block a user