pull/7248/head
Medya Gh 2020-03-25 22:15:24 -07:00
parent acc951033b
commit dc5dd62b58
4 changed files with 11 additions and 11 deletions

View File

@ -156,9 +156,9 @@ func TestDownloadOnlyKic(t *testing.T) {
args := []string{"start", "--download-only", "-p", profile, "--force", "--alsologtostderr"}
args = append(args, StartArgs()...)
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil {
t.Errorf("start with download only failed %q : %v:\n%s", args, err)
if _, err := Run(t, exec.CommandContext(ctx, Target(), args...)); err != nil {
t.Errorf("start with download only failed %q : %v", args, err)
}
// Make sure the downloaded image tarball exists

View File

@ -179,7 +179,7 @@ func validateRegistryAddon(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("failed run minikube ip. args %q : %v", rr.Args, err)
}
if rr.Stderr.String() != "" {
t.Errorf("expected stderr to be -empty- but got: *%q*", rr.Args, rr.Stderr)
t.Errorf("expected stderr to be -empty- but got: *%q* . args %q", rr.Stderr, rr.Args)
}
endpoint := fmt.Sprintf("http://%s:%d", strings.TrimSpace(rr.Stdout.String()), 5000)

View File

@ -598,11 +598,11 @@ func validateProfileCmd(ctx context.Context, t *testing.T, profile string) {
func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
rr, err := Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "create", "deployment", "hello-node", "--image=gcr.io/hello-minikube-zero-install/hello-node"))
if err != nil {
t.Logf("% failed: %v (may not be an error)", rr.Args, err)
t.Logf("%q failed: %v (may not be an error).", rr.Args, err)
}
rr, err = Run(t, exec.CommandContext(ctx, "kubectl", "--context", profile, "expose", "deployment", "hello-node", "--type=NodePort", "--port=8080"))
if err != nil {
t.Logf("%s failed: %v (may not be an error)", rr.Args, err)
t.Logf("%q failed: %v (may not be an error)", rr.Args, err)
}
if _, err := PodWait(ctx, t, profile, "default", "app=hello-node", Minutes(10)); err != nil {
@ -656,7 +656,7 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("failed to parse %q: %v", endpoint, err)
}
if u.Scheme != "http" {
t.Fatalf("expected scheme to be -'http'- got scheme: *%q*", "http", u.Scheme)
t.Fatalf("expected scheme to be -%q- got scheme: *%q*", "http", u.Scheme)
}
t.Logf("url: %s", endpoint)
@ -665,7 +665,7 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("get failed: %v\nresp: %v", err, resp)
}
if resp.StatusCode != http.StatusOK {
t.Fatalf("expeced status code for %q to be -%q- but got *%q*", endpoint, http.StatusOK, resp.StatusCode)
t.Fatalf("expected status code for %q to be -%q- but got *%q*", endpoint, http.StatusOK, resp.StatusCode)
}
}
@ -813,7 +813,7 @@ func validateCertSync(ctx context.Context, t *testing.T, profile string) {
t.Logf("Checking for existence of %s within VM", vp)
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("cat %s", vp)))
if err != nil {
t.Errorf("failed to check existance of %q inside minikube. args %q: %v", vp, rr.Args, err)
t.Errorf("failed to check existence of %q inside minikube. args %q: %v", vp, rr.Args, err)
}
// Strip carriage returned by ssh

View File

@ -115,13 +115,13 @@ func TestStartStop(t *testing.T) {
// Enable an addon to assert it comes up afterwards
rr, err = Run(t, exec.CommandContext(ctx, Target(), "addons", "enable", "dashboard", "-p", profile))
if err != nil {
t.Errorf("failed to enable an addon while minikube is stopped. args %q: ", rr.Args, err)
t.Errorf("failed to enable an addon post-stop. args %q: %v", rr.Args, err)
}
rr, err = Run(t, exec.CommandContext(ctx, Target(), startArgs...))
if err != nil {
// Explicit fatal so that failures don't move directly to deletion
t.Fatalf("Failed to start minikube after stop -Second Start-. args %q: %v", rr.Args, err)
t.Fatalf("failed to start minikube post-stop. args %q: %v", rr.Args, err)
}
if strings.Contains(tc.name, "cni") {