Skip to content

Commit

Permalink
delete minikube in test before starting with containerd
Browse files Browse the repository at this point in the history
also remove extra logs
  • Loading branch information
Priya Wadhwa committed Dec 6, 2018
1 parent 420eb32 commit 0e4a28c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
28 changes: 1 addition & 27 deletions test/integration/addons_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ import (
"bufio"
"fmt"
"io/ioutil"
"log"
"net"
"net/http"
"net/url"
Expand Down Expand Up @@ -188,35 +187,10 @@ func testServicesList(t *testing.T) {
func testGvisor(t *testing.T) {
minikubeRunner := NewMinikubeRunner(t)
kubectlRunner := util.NewKubectlRunner(t)

t.Log("enabling gvisor addon")
output := minikubeRunner.RunCommand("addons enable gvisor", true)
t.Log(output)
minikubeRunner.RunCommand("addons enable gvisor", true)

t.Log("waiting for gvisor controller to come up")
if err := util.WaitForGvisorControllerRunning(t); err != nil {
// Print out logs from controller
out, err := kubectlRunner.RunCommand([]string{"get", "pods", "--all-namespaces"})
log.Print(string(out))
if err != nil {
t.Errorf("error getting all pods %v", err)
}

out, err = kubectlRunner.RunCommand([]string{"logs", "kube-addon-manager-minikube", "-n", "kube-system"})
log.Print(string(out))
if err != nil {
t.Errorf("error getting addon manager logs%v", err)
}

output, err := minikubeRunner.CombinedOutput("ls /etc/kubernetes/addons")
log.Print(output)
if err != nil {
t.Errorf("getting files in /etc/kubernetes/addons")
}

if _, err := kubectlRunner.RunCommand([]string{"logs", "gvisor", "-n", "kube-system"}); err != nil {
t.Errorf("error getting gvisor logs: %v", err)
}
t.Fatalf("waiting for gvisor controller to be up: %v", err)
}

Expand Down
1 change: 1 addition & 0 deletions test/integration/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func TestFunctionalContainerd(t *testing.T) {
t.Skip("Can't run containerd backend with none driver")
}

minikubeRunner.RunCommand("delete", true)
minikubeRunner.SetRuntime(constants.ContainerdRuntime)
minikubeRunner.EnsureRunning()

Expand Down
1 change: 0 additions & 1 deletion test/integration/util/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ func (m *MinikubeRunner) RunCommand(command string, checkError bool) string {
commandArr := strings.Split(command, " ")
path, _ := filepath.Abs(m.BinaryPath)
cmd := exec.Command(path, commandArr...)
m.T.Logf("Executing command: %s", cmd)
stdout, err := cmd.Output()

if checkError && err != nil {
Expand Down

0 comments on commit 0e4a28c

Please sign in to comment.