mirror of
https://github.com/kairos-io/kcrypt-challenger.git
synced 2025-09-19 18:02:46 +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:
@@ -10,7 +10,7 @@ K3S_IMAGE="rancher/k3s:v1.26.1-k3s1"
|
|||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
CLUSTER_NAME=$(echo $RANDOM | md5sum | head -c 10; echo;)
|
CLUSTER_NAME=$(echo $RANDOM | md5sum | head -c 10; echo;)
|
||||||
KUBECONFIG=$(mktemp)
|
export KUBECONFIG=$(mktemp)
|
||||||
|
|
||||||
# https://unix.stackexchange.com/a/423052
|
# https://unix.stackexchange.com/a/423052
|
||||||
getFreePort() {
|
getFreePort() {
|
||||||
|
Reference in New Issue
Block a user