From 97ca925a8aed7e7e559ade069f12c6f2627f8e08 Mon Sep 17 00:00:00 2001 From: Kenta Iso Date: Sat, 2 May 2020 19:00:39 +0900 Subject: [PATCH] Use validateStartWithProxy to avoid network access failure --- test/integration/tunnel_test.go | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) diff --git a/test/integration/tunnel_test.go b/test/integration/tunnel_test.go index f3a949b293..3e6a94d913 100644 --- a/test/integration/tunnel_test.go +++ b/test/integration/tunnel_test.go @@ -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)