in integration test - validate the exit code
parent
13ee52fc99
commit
85242d0711
|
|
@ -29,6 +29,7 @@ import (
|
|||
"time"
|
||||
|
||||
"k8s.io/minikube/pkg/kapi"
|
||||
"k8s.io/minikube/pkg/minikube/reason"
|
||||
"k8s.io/minikube/pkg/util/retry"
|
||||
)
|
||||
|
||||
|
|
@ -213,6 +214,10 @@ func validateFalseCNI(ctx context.Context, t *testing.T, profile string) {
|
|||
if err == nil {
|
||||
t.Errorf("%s expected to fail", mkCmd)
|
||||
}
|
||||
if rr.ExitCode != reason.Usage.ExitCode {
|
||||
t.Errorf("Expected %d exit code, got %d", reason.Usage.ExitCode, rr.ExitCode)
|
||||
|
||||
}
|
||||
expectedMsg := fmt.Sprintf("The %q container runtime requires CNI", cr)
|
||||
if !strings.Contains(rr.Output(), expectedMsg) {
|
||||
t.Errorf("Expected %q line not found in output %s", expectedMsg, rr.Output())
|
||||
|
|
|
|||
Loading…
Reference in New Issue