mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-05-13 19:04:37 +00:00
export KUBECONFIG so that it's set when running commands in go tests
Error: ``` [FAILED] Error from server (NotFound): namespaces "actions-runner-system" not found ``` coming from: /runner/_work/kcrypt-challenger/kcrypt-challenger/tests/encryption_test.go:157 is suspicious. That namespace shouldn't exist in the test k3d cluster, no idea why it was looked up. I suspect the env for the following command somehow pointed to the "outer" cluster: ``` cmd := exec.Command("kubectl", "get", "secrets", ...) ``` Signed-off-by: Dimitris Karakasilis <dimitris@karakasilis.me>
This commit is contained in:
parent
ffd5f18bcf
commit
8d0fb0148d
@ -10,7 +10,7 @@ K3S_IMAGE="rancher/k3s:v1.26.1-k3s1"
|
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||
CLUSTER_NAME=$(echo $RANDOM | md5sum | head -c 10; echo;)
|
||||
KUBECONFIG=$(mktemp)
|
||||
export KUBECONFIG=$(mktemp)
|
||||
|
||||
# https://unix.stackexchange.com/a/423052
|
||||
getFreePort() {
|
||||
|
Loading…
Reference in New Issue
Block a user