提交 7b9ec8ad 编写于 作者: P Priya Wadhwa

Fix TestFunctional/Logs for all runtimes

上级 6eaf2fd9
......@@ -699,9 +699,19 @@ func validateLogsCmd(ctx context.Context, t *testing.T, profile string) {
if err != nil {
t.Errorf("%s failed: %v", rr.Command(), err)
}
for _, word := range []string{"Docker", "apiserver", "Linux", "kubelet"} {
expectedWords := []string{"apiserver", "Linux", "kubelet"}
switch ContainerRuntime() {
case "docker":
expectedWords = append(expectedWords, "Docker")
case "containerd":
expectedWords = append(expectedWords, "containerd")
case "crio":
expectedWords = append(expectedWords, "crio")
}
for _, word := range expectedWords {
if !strings.Contains(rr.Stdout.String(), word) {
t.Errorf("excpeted minikube logs to include word: -%q- but got \n***%s***\n", word, rr.Output())
t.Errorf("expected minikube logs to include word: -%q- but got \n***%s***\n", word, rr.Output())
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册