pull/9577/head
Sharif Elgamal 2020-10-28 18:49:08 -07:00
parent a904da4e26
commit a9a1c4a71e
1 changed files with 4 additions and 3 deletions

View File

@ -157,14 +157,15 @@ func validateIngressAddon(ctx context.Context, t *testing.T, profile string) {
want := "Welcome to nginx!"
addr := "http://127.0.0.1/"
checkIngress := func() error {
var rr RunResult
var rr *RunResult
var err error
if NoneDriver() { // just run curl directly on the none driver
rr, err := Run(t, exec.CommandContext(ctx, fmt.Sprintf("curl -s %s -H 'Host: nginx.example.com'", addr))
rr, err = Run(t, exec.CommandContext(ctx, fmt.Sprintf("curl -s %s -H 'Host: nginx.example.com'", addr)))
if err != nil {
return err
}
} else {
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("curl -s %s -H 'Host: nginx.example.com'", addr)))
rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "ssh", fmt.Sprintf("curl -s %s -H 'Host: nginx.example.com'", addr)))
if err != nil {
return err
}