Skip to content

Commit

Permalink
Fix service https output and tests
Browse files Browse the repository at this point in the history
  • Loading branch information
yardik committed Feb 1, 2022
1 parent ce1d30f commit 0f16486
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 1 addition & 7 deletions cmd/minikube/cmd/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func startKicServiceTunnels(args []string, services service.URLs, configName str
if err != nil {
exit.Error(reason.SvcTunnelStart, "error starting tunnel", err)
}
defer serviceTunnel.Stop()

data = append(data, []string{namespace, svc.Name, "", strings.Join(urls, "\n")})
}
Expand All @@ -199,13 +200,6 @@ func startKicServiceTunnels(args []string, services service.URLs, configName str
out.WarningT("Because you are using a Docker driver on {{.operating_system}}, the terminal needs to be open to run it.", out.V{"operating_system": runtime.GOOS})

<-ctrlC

for _, tunnel := range tunnels {
err = tunnel.Stop()
if err != nil {
exit.Error(reason.SvcTunnelStop, "error stopping tunnel", err)
}
}
}

func openURLs(svc string, urls []string) {
Expand Down
2 changes: 1 addition & 1 deletion test/integration/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ func validateServiceCmd(ctx context.Context, t *testing.T, profile string) {
t.Errorf("expected stderr to be empty but got *%q* . args %q", rr.Stderr, rr.Command())
}

endpoint := strings.TrimSpace(rr.Stdout.String())
endpoint := strings.TrimSpace(strings.Split(rr.Stdout.String(), "|")[44])
t.Logf("found endpoint: %s", endpoint)

u, err := url.Parse(endpoint)
Expand Down

0 comments on commit 0f16486

Please sign in to comment.