mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-02-04 20:12:30 +00:00
This commit is meant to be reverted when the upstream bug is fixed which causes tests to fail when the race detector is enabled for unit tests in the impersonator package. There is a commit in the hack dir and another commit in the `ci` branch for CI.
23 lines
888 B
Bash
Executable File
23 lines
888 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Copyright 2020-2025 the Pinniped contributors. All Rights Reserved.
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
set -euo pipefail
|
|
go version
|
|
|
|
COVERAGE_OUTPUT="$PWD/unit-test-coverage/coverage.txt"
|
|
export KUBE_CACHE_MUTATION_DETECTOR=true
|
|
export KUBE_PANIC_WATCH_DECODE_ERROR=true
|
|
|
|
export GOCACHE="$PWD/cache/gocache"
|
|
export GOMODCACHE="$PWD/cache/gomodcache"
|
|
|
|
cd pinniped
|
|
|
|
# Temporarily avoid using the race detector for the impersonator package due to https://github.com/kubernetes/kubernetes/issues/128548
|
|
# Note that this will exclude the impersonator package from the code coverage for now as a side effect.
|
|
# TODO: change this back to using the race detector everywhere
|
|
go test -short -timeout 15m -race -coverprofile "${COVERAGE_OUTPUT}" -covermode atomic $(go list ./... | grep -v internal/concierge/impersonator)
|
|
go test -short ./internal/concierge/impersonator
|