diff --git a/test/integration/examples/apiserver_test.go b/test/integration/examples/apiserver_test.go index 636f3d370a5..40fc308e0e2 100644 --- a/test/integration/examples/apiserver_test.go +++ b/test/integration/examples/apiserver_test.go @@ -57,6 +57,10 @@ func TestRunServer(t *testing.T) { defer os.Remove(kubeconfigFile.Name()) clientcmd.WriteToFile(*adminKubeConfig, kubeconfigFile.Name()) + // Avoid default cert-dir of /var/run/kubernetes to allow this to run on darwin + certDir, _ := ioutil.TempDir("", "test-integration-apiserver") + defer os.Remove(certDir) + stopCh := make(chan struct{}) defer close(stopCh) cmd := server.NewCommandStartWardleServer(os.Stdout, os.Stderr, stopCh) @@ -66,6 +70,7 @@ func TestRunServer(t *testing.T) { "--authentication-kubeconfig", kubeconfigFile.Name(), "--authorization-kubeconfig", kubeconfigFile.Name(), "--etcd-servers", framework.GetEtcdURLFromEnv(), + "--cert-dir", certDir, }) go cmd.Execute() diff --git a/test/integration/kubeaggregator/aggregator_test.go b/test/integration/kubeaggregator/aggregator_test.go index 2b9ef472c50..37acb77ccb2 100644 --- a/test/integration/kubeaggregator/aggregator_test.go +++ b/test/integration/kubeaggregator/aggregator_test.go @@ -18,7 +18,9 @@ package kubeaggregator import ( "fmt" + "io/ioutil" "net/http" + "os" "testing" "time" @@ -50,6 +52,12 @@ func runAPIServer(t *testing.T, stopCh <-chan struct{}) string { // Change the ports, because otherwise it will fail if examples/apiserver/apiserver_test and this are run in parallel. serverRunOptions.SecureServing.ServingOptions.BindPort = 6443 + 3 serverRunOptions.InsecureServing.BindPort = 8080 + 3 + + // Avoid default cert-dir of /var/run/kubernetes to allow this to run on darwin + certDir, _ := ioutil.TempDir("", "test-integration-kubeaggregator") + defer os.Remove(certDir) + serverRunOptions.SecureServing.ServerCert.CertDirectory = certDir + go func() { if err := serverRunOptions.Run(stopCh); err != nil { t.Fatalf("Error in bringing up the example apiserver: %v", err)