revert unrelated changes
parent
1029dfc288
commit
ab9349af1f
|
|
@ -155,7 +155,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 37 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
functional_virtualbox_macos:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -233,7 +233,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 34 ];then echo "*** Failed to pass at least 33 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 33 ];then echo "*** Failed to pass at least 33 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
functional_docker_windows:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -346,7 +346,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
If ($numFail -gt 0){ exit 2 }
|
||||
If ($numPass -eq 0){ exit 2 }
|
||||
If ($numPass -lt 34){ exit 2 }
|
||||
If ($numPass -lt 33){ exit 2 }
|
||||
If ($numFail -eq 0){ exit 0 }
|
||||
functional_hyperv_windows:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -457,7 +457,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
If ($numFail -gt 0){ exit 2 }
|
||||
If ($numPass -eq 0){ exit 2 }
|
||||
If ($numPass -lt 34){ exit 2 }
|
||||
If ($numPass -lt 33){ exit 2 }
|
||||
If ($numFail -eq 0){ exit 0 }
|
||||
functional_baremetal_ubuntu18_04:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -541,7 +541,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 28 ];then echo "*** Failed to pass at least 27 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 27 ];then echo "*** Failed to pass at least 27 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
addons_certs_docker_ubuntu:
|
||||
runs-on: ubuntu-18.04
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 37 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 36 ];then echo "*** Failed to pass at least 36 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
functional_virtualbox_macos:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -231,7 +231,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 34 ];then echo "*** Failed to pass at least 33 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 33 ];then echo "*** Failed to pass at least 33 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
functional_docker_windows:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -344,7 +344,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
If ($numFail -gt 0){ exit 2 }
|
||||
If ($numPass -eq 0){ exit 2 }
|
||||
If ($numPass -lt 34){ exit 2 }
|
||||
If ($numPass -lt 33){ exit 2 }
|
||||
If ($numFail -eq 0){ exit 0 }
|
||||
functional_hyperv_windows:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -455,7 +455,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
If ($numFail -gt 0){ exit 2 }
|
||||
If ($numPass -eq 0){ exit 2 }
|
||||
If ($numPass -lt 34){ exit 2 }
|
||||
If ($numPass -lt 33){ exit 2 }
|
||||
If ($numFail -eq 0){ exit 0 }
|
||||
functional_baremetal_ubuntu18_04:
|
||||
needs: [build_minikube]
|
||||
|
|
@ -539,7 +539,7 @@ jobs:
|
|||
echo "*** $numPass Passed ***"
|
||||
if [ "$numFail" -gt 0 ];then echo "*** $numFail Failed ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** 0 Passed! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 28 ];then echo "*** Failed to pass at least 27 ! ***";exit 2;fi
|
||||
if [ "$numPass" -lt 27 ];then echo "*** Failed to pass at least 27 ! ***";exit 2;fi
|
||||
if [ "$numPass" -eq 0 ];then echo "*** Passed! ***";exit 0;fi
|
||||
addons_certs_docker_ubuntu:
|
||||
runs-on: ubuntu-18.04
|
||||
|
|
|
|||
|
|
@ -154,57 +154,52 @@ func validateNodeLabels(ctx context.Context, t *testing.T, profile string) {
|
|||
// check functionality of minikube after evaling docker-env
|
||||
func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
|
||||
defer PostMortemLogs(t, profile)
|
||||
mctx, cancel := context.WithTimeout(ctx, Seconds(30))
|
||||
defer cancel()
|
||||
var rr *RunResult
|
||||
var err error
|
||||
if runtime.GOOS == "windows" {
|
||||
c := exec.CommandContext(mctx, "powershell.exe", "-NoProfile", "-NonInteractive", Target()+" -p "+profile+" docker-env | Invoke-Expression ;"+Target()+" status -p "+profile)
|
||||
rr, err = Run(t, c)
|
||||
} else {
|
||||
c := exec.CommandContext(mctx, "/bin/bash", "-c", "eval $("+Target()+" -p "+profile+" docker-env) && "+Target()+" status -p "+profile)
|
||||
// we should be able to get minikube status with a bash which evaled docker-env
|
||||
rr, err = Run(t, c)
|
||||
}
|
||||
if mctx.Err() == context.DeadlineExceeded {
|
||||
t.Errorf("failed to run the command by deadline. exceeded timeout. %s", rr.Command())
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatalf("failed to do status after eval-ing docker-env. error: %v", err)
|
||||
}
|
||||
if !strings.Contains(rr.Output(), "Running") {
|
||||
t.Fatalf("expected status output to include 'Running' after eval docker-env but got: *%s*", rr.Output())
|
||||
}
|
||||
|
||||
t.Run("StatusAfterEval", func(t *testing.T) {
|
||||
mctx, cancel := context.WithTimeout(ctx, Seconds(30))
|
||||
defer cancel()
|
||||
var rr *RunResult
|
||||
var err error
|
||||
if runtime.GOOS == "windows" {
|
||||
c := exec.CommandContext(mctx, "powershell.exe", "-NoProfile", "-NonInteractive", Target()+" -p "+profile+" docker-env | Invoke-Expression ;"+Target()+" status -p "+profile)
|
||||
rr, err = Run(t, c)
|
||||
} else {
|
||||
c := exec.CommandContext(mctx, "/bin/bash", "-c", "eval $("+Target()+" -p "+profile+" docker-env) && "+Target()+" status -p "+profile)
|
||||
// we should be able to get minikube status with a bash which evaled docker-env
|
||||
rr, err = Run(t, c)
|
||||
}
|
||||
if mctx.Err() == context.DeadlineExceeded {
|
||||
t.Errorf("failed to run the command by deadline. exceeded timeout. %s", rr.Command())
|
||||
}
|
||||
if err != nil {
|
||||
t.Logf("failed to do status after eval-ing docker-env. error: %v", err)
|
||||
}
|
||||
if !strings.Contains(rr.Output(), "Running") {
|
||||
t.Fatalf("expected status output to include 'Running' after eval docker-env but got: *%s*", rr.Output())
|
||||
}
|
||||
})
|
||||
mctx, cancel = context.WithTimeout(ctx, Seconds(30))
|
||||
defer cancel()
|
||||
// do a eval $(minikube -p profile docker-env) and check if we are point to docker inside minikube
|
||||
if runtime.GOOS == "windows" { // testing docker-env eval in powershell
|
||||
c := exec.CommandContext(mctx, "powershell.exe", "-NoProfile", "-NonInteractive", Target(), "-p "+profile+" docker-env | Invoke-Expression ; docker images")
|
||||
rr, err = Run(t, c)
|
||||
} else {
|
||||
c := exec.CommandContext(mctx, "/bin/bash", "-c", "eval $("+Target()+" -p "+profile+" docker-env) && docker images")
|
||||
rr, err = Run(t, c)
|
||||
}
|
||||
|
||||
t.Run("ListImages", func(t *testing.T) {
|
||||
mctx, cancel := context.WithTimeout(ctx, Seconds(30))
|
||||
defer cancel()
|
||||
var rr *RunResult
|
||||
var err error
|
||||
// do a eval $(minikube -p profile docker-env) and check if we are point to docker inside minikube
|
||||
if runtime.GOOS == "windows" { // testing docker-env eval in powershell
|
||||
c := exec.CommandContext(mctx, "powershell.exe", "-NoProfile", "-NonInteractive", Target(), "-p "+profile+" docker-env | Invoke-Expression ; docker images")
|
||||
rr, err = Run(t, c)
|
||||
} else {
|
||||
c := exec.CommandContext(mctx, "/bin/bash", "-c", "eval $("+Target()+" -p "+profile+" docker-env) && docker images")
|
||||
rr, err = Run(t, c)
|
||||
}
|
||||
if mctx.Err() == context.DeadlineExceeded {
|
||||
t.Errorf("failed to run the command in 30 seconds. exceeded 30s timeout. %s", rr.Command())
|
||||
}
|
||||
if mctx.Err() == context.DeadlineExceeded {
|
||||
t.Errorf("failed to run the command in 30 seconds. exceeded 30s timeout. %s", rr.Command())
|
||||
}
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("failed to run minikube docker-env. args %q : %v ", rr.Command(), err)
|
||||
}
|
||||
if err != nil {
|
||||
t.Fatalf("failed to run minikube docker-env. args %q : %v ", rr.Command(), err)
|
||||
}
|
||||
|
||||
expectedImgInside := "gcr.io/k8s-minikube/storage-provisioner"
|
||||
if !strings.Contains(rr.Output(), expectedImgInside) {
|
||||
t.Fatalf("expected 'docker images' to have %q inside minikube. but the output is: *%s*", expectedImgInside, rr.Output())
|
||||
}
|
||||
|
||||
expectedImgInside := "gcr.io/k8s-minikube/storage-provisioner"
|
||||
if !strings.Contains(rr.Output(), expectedImgInside) {
|
||||
t.Fatalf("expected 'docker images' to have %q inside minikube. but the output is: *%s*", expectedImgInside, rr.Output())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
func validateStartWithProxy(ctx context.Context, t *testing.T, profile string) {
|
||||
|
|
@ -217,7 +212,7 @@ func validateStartWithProxy(ctx context.Context, t *testing.T, profile string) {
|
|||
|
||||
// Use more memory so that we may reliably fit MySQL and nginx
|
||||
// changing api server so later in soft start we verify it didn't change
|
||||
startArgs := append([]string{"start", "-p", profile, "--memory=3600", fmt.Sprintf("--apiserver-port=%d", apiPortTest), "--wait=true"}, StartArgs()...)
|
||||
startArgs := append([]string{"start", "-p", profile, "--memory=2800", fmt.Sprintf("--apiserver-port=%d", apiPortTest), "--wait=true"}, StartArgs()...)
|
||||
c := exec.CommandContext(ctx, Target(), startArgs...)
|
||||
env := os.Environ()
|
||||
env = append(env, fmt.Sprintf("HTTP_PROXY=%s", srv.Addr))
|
||||
|
|
|
|||
Loading…
Reference in New Issue