make sure minikube binary is available on PATH for skaffold binary to call
parent
0941f0f65c
commit
1d48d43605
|
@ -701,7 +701,8 @@ jobs:
|
|||
mkdir -p report
|
||||
mkdir -p testhome
|
||||
chmod a+x e2e-*
|
||||
chmod a+x minikube-*
|
||||
cp minikube-darwin-amd64 minikube
|
||||
chmod a+x minikube*
|
||||
START_TIME=$(date -u +%s)
|
||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-darwin-amd64 -minikube-start-args=--vm-driver=virtualbox -test.run "(TestAddons|TestCertOptions|TestSkaffold)" -test.timeout=15m -test.v -timeout-multiplier=3 -binary=./minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
|
||||
END_TIME=$(date -u +%s)
|
||||
|
|
|
@ -697,7 +697,8 @@ jobs:
|
|||
mkdir -p report
|
||||
mkdir -p testhome
|
||||
chmod a+x e2e-*
|
||||
chmod a+x minikube-*
|
||||
cp minikube-darwin-amd64 minikube
|
||||
chmod a+x minikube*
|
||||
START_TIME=$(date -u +%s)
|
||||
KUBECONFIG=$(pwd)/testhome/kubeconfig MINIKUBE_HOME=$(pwd)/testhome ./e2e-darwin-amd64 -minikube-start-args=--vm-driver=virtualbox -test.run "(TestAddons|TestCertOptions|TestSkaffold)" -test.timeout=15m -test.v -timeout-multiplier=3 -binary=./minikube-darwin-amd64 2>&1 | tee ./report/testout.txt
|
||||
END_TIME=$(date -u +%s)
|
||||
|
|
|
@ -24,6 +24,7 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"testing"
|
||||
"time"
|
||||
|
@ -56,6 +57,12 @@ func TestSkaffold(t *testing.T) {
|
|||
// make sure "skaffold run" exits without failure
|
||||
cmd := exec.CommandContext(ctx, tf.Name(), "run", "--kube-context", profile, "--status-check=true", "--port-forward=false")
|
||||
cmd.Dir = "testdata/skaffold"
|
||||
// make sure minikube binary is in path so that skaffold can access it
|
||||
abs, err := filepath.Abs(Target())
|
||||
if err != nil {
|
||||
t.Fatalf("absolute path to minikube binary: %v", err)
|
||||
}
|
||||
os.Setenv("PATH", fmt.Sprintf("%s:%s", os.Getenv("PATH"), filepath.Dir(abs)))
|
||||
rr, err = Run(t, cmd)
|
||||
if err != nil {
|
||||
t.Fatalf("error running skaffold: %v\n%s", err, rr.Output())
|
||||
|
|
Loading…
Reference in New Issue