Fix merge breakage.

pull/3187/head
Thomas Stromberg 2018-10-19 14:16:03 -07:00
parent 72e596507a
commit 13e580b588
6 changed files with 31 additions and 49 deletions

View File

@ -258,61 +258,32 @@ func TestOptionallyHttpsFormattedUrlString(t *testing.T) {
expectedIsHTTPSchemedURL bool
}{
{
<<<<<<< HEAD
description: "no https for http schemed with no https option",
bareUrlString: "http://192.168.99.100:30563",
bareURLString: "http://192.168.99.100:30563",
https: false,
expectedHttpsFormattedUrlString: "http://192.168.99.100:30563",
expectedIsHttpSchemedURL: true,
},
{
description: "no https for non-http schemed with no https option",
bareUrlString: "xyz.http.myservice:30563",
https: false,
expectedHttpsFormattedUrlString: "xyz.http.myservice:30563",
expectedIsHttpSchemedURL: false,
},
{
description: "https for http schemed with https option",
bareUrlString: "http://192.168.99.100:30563",
https: true,
expectedHttpsFormattedUrlString: "https://192.168.99.100:30563",
expectedIsHttpSchemedURL: true,
},
{
description: "no https for non-http schemed with https option and http substring",
bareUrlString: "xyz.http.myservice:30563",
https: true,
expectedHttpsFormattedUrlString: "xyz.http.myservice:30563",
expectedIsHttpSchemedURL: false,
=======
description: "no https for http schemed with no https option",
bareURLString: "http://192.168.99.100:30563",
https: false,
expectedHTTPSFormattedURLString: "http://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true,
},
{
description: "no https for non-http schemed with no https option",
bareURLString: "xyz.http.myservice:30563",
https: false,
description: "no https for non-http schemed with no https option",
bareURLString: "xyz.http.myservice:30563",
https: false,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false,
},
{
description: "https for http schemed with https option",
bareURLString: "http://192.168.99.100:30563",
https: true,
description: "https for http schemed with https option",
bareURLString: "http://192.168.99.100:30563",
https: true,
expectedHTTPSFormattedURLString: "https://192.168.99.100:30563",
expectedIsHTTPSchemedURL: true,
},
{
description: "no https for non-http schemed with https option and http substring",
bareURLString: "xyz.http.myservice:30563",
https: true,
description: "no https for non-http schemed with https option and http substring",
bareURLString: "xyz.http.myservice:30563",
https: true,
expectedHTTPSFormattedURLString: "xyz.http.myservice:30563",
expectedIsHTTPSchemedURL: false,
>>>>>>> master
},
}

View File

@ -134,8 +134,13 @@ func testIngressController(t *testing.T) {
t.Fatalf(err.Error())
}
defer kubectlRunner.RunCommand([]string{"delete", "-f", podPath})
defer kubectlRunner.RunCommand([]string{"delete", "-f", ingressPath})
defer func() {
for _, p := range []string{podPath, ingressPath} {
if out, err := kubectlRunner.RunCommand([]string{"delete", "-f", p}); err != nil {
t.Logf("delete -f %s failed: %v\noutput: %s\n", p, err, out)
}
}
}()
minikubeRunner.RunCommand("addons disable ingress", true)
}

View File

@ -23,7 +23,7 @@ import (
"testing"
"time"
api "k8s.io/api/core/v1"
api "k8s.io/kubernetes/pkg/apis/core"
"k8s.io/minikube/test/integration/util"
)

View File

@ -76,7 +76,12 @@ func testMounting(t *testing.T) {
}
return nil
}
defer kubectlRunner.RunCommand([]string{"delete", "-f", podPath})
defer func() {
if out, err := kubectlRunner.RunCommand([]string{"delete", "-f", podPath}); err != nil {
t.Logf("delete -f %s failed: %v\noutput: %s\n", podPath, err, out)
}
}()
if err := util.Retry(t, setupTest, 5*time.Second, 40); err != nil {
t.Fatal("mountTest failed with error:", err)

View File

@ -41,17 +41,18 @@ var (
func testProvisioning(t *testing.T) {
t.Parallel()
kubectlRunner := util.NewKubectlRunner(t)
defer func() {
kubectlRunner.RunCommand([]string{"delete", "pvc", pvcName})
}()
if out, err := kubectlRunner.RunCommand([]string{"delete", "pvc", pvcName}); err != nil {
t.Logf("delete pvc %s failed: %v\noutput: %s\n", pvcName, err, out)
}
// We have to make sure the addon-manager has created the StorageClass before creating
// a claim. Otherwise it will never get bound.
checkStorageClass := func() error {
scl := storage.StorageClassList{}
kubectlRunner.RunCommandParseOutput([]string{"get", "storageclass"}, &scl)
if err := kubectlRunner.RunCommandParseOutput([]string{"get", "storageclass"}, &scl); err != nil {
return fmt.Errorf("get storageclass: %v", err)
}
if len(scl.Items) > 0 {
return nil
}

View File

@ -88,7 +88,7 @@ func (m *MinikubeRunner) RunDaemon(command string) (*exec.Cmd, *bufio.Reader) {
cmd := exec.Command(path, commandArr...)
stdoutPipe, err := cmd.StdoutPipe()
if err != nil {
m.T.Fatalf("Error running command: %s %v", command, err)
m.T.Fatalf("stdout pipe failed: %s %v", command, err)
}
err = cmd.Start()