Use validateStartWithProxy to avoid network access failure

pull/7956/head
Kenta Iso 2020-05-02 19:00:39 +09:00
parent 2f052eb34a
commit 97ca925a8a
1 changed files with 8 additions and 19 deletions

View File

@ -61,14 +61,14 @@ func TestTunnel(t *testing.T) {
name string
validator validateFunc
}{
{"Start", validateMinikubeStart},
{"StartTunnel", validateTunnelStart},
{"WaitService", validateServiceStable},
{"AccessDirect", validateAccessDirect},
{"DNSResolutionByDig", validateDNSDig},
{"DNSResolutionByDscacheutil", validateDNSDscacheutil},
{"AccessThroughDNS", validateAccessDNS},
{"DeleteTunnel", validateTunnelDelete},
{"StartWithProxy", validateStartWithProxy}, // Start cluster same as TestFunctional
{"StartTunnel", validateTunnelStart}, // Start tunnel
{"WaitService", validateServiceStable}, // Wait for service is stable
{"AccessDirect", validateAccessDirect}, // Access test for loadbalancer IP
{"DNSResolutionByDig", validateDNSDig}, // DNS forwarding test by dig
{"DNSResolutionByDscacheutil", validateDNSDscacheutil}, // DNS forwarding test by dscacheutil
{"AccessThroughDNS", validateAccessDNS}, // Access test for absolute dns name
{"DeleteTunnel", validateTunnelDelete}, // Stop tunnel and delete cluster
}
for _, tc := range tests {
tc := tc
@ -117,17 +117,6 @@ func getKubeDNSIP(t *testing.T, profile string) string {
return ip.String()
}
// validateMinikubeStart starts minikube cluster
func validateMinikubeStart(ctx context.Context, t *testing.T, profile string) {
checkRoutePassword(t)
args := append([]string{"start", "-p", profile, "--memory=1800", "--install-addons=false", "--wait=all"}, StartArgs()...)
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil {
t.Fatalf("failed to start minikube with args: %q : %v", rr.Command(), err)
}
}
// validateTunnelStart starts `minikube tunnel`
func validateTunnelStart(ctx context.Context, t *testing.T, profile string) {
checkRoutePassword(t)