提交 ad9e71dc 编写于 作者: S Sharif Elgamal

fix up multinode test

上级 970d9546
......@@ -179,7 +179,7 @@ func validateStartNodeAfterStop(ctx context.Context, t *testing.T, profile strin
}
func validateStopMultiNodeCluster(ctx context.Context, t *testing.T, profile string) {
// Run minikube node stop on that node
// Run minikube stop on the cluster
rr, err := Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "stop"))
if err != nil {
t.Errorf("node stop returned an error. args %q: %v", rr.Command(), err)
......@@ -198,11 +198,11 @@ func validateStopMultiNodeCluster(ctx context.Context, t *testing.T, profile str
t.Fatalf("failed to run minikube status. args %q : %v", rr.Command(), err)
}
if strings.Count(rr.Stdout.String(), "host: Stopped") != 2 {
if strings.Count(rr.Stdout.String(), "host: Stopped") != 3 {
t.Errorf("incorrect number of stopped hosts: args %q: %v", rr.Command(), rr.Stdout.String())
}
if strings.Count(rr.Stdout.String(), "kubelet: Stopped") != 2 {
if strings.Count(rr.Stdout.String(), "kubelet: Stopped") != 3 {
t.Errorf("incorrect number of stopped kubelets: args %q: %v", rr.Command(), rr.Stdout.String())
}
}
......@@ -230,11 +230,11 @@ func validateRestartMultiNodeCluster(ctx context.Context, t *testing.T, profile
t.Fatalf("failed to run minikube status. args %q : %v", rr.Command(), err)
}
if strings.Count(rr.Stdout.String(), "host: Running") != 2 {
if strings.Count(rr.Stdout.String(), "host: Running") != 3 {
t.Errorf("status says both hosts are not running: args %q: %v", rr.Command(), rr.Output())
}
if strings.Count(rr.Stdout.String(), "kubelet: Running") != 2 {
if strings.Count(rr.Stdout.String(), "kubelet: Running") != 3 {
t.Errorf("status says both kubelets are not running: args %q: %v", rr.Command(), rr.Output())
}
......@@ -244,8 +244,8 @@ func validateRestartMultiNodeCluster(ctx context.Context, t *testing.T, profile
t.Fatalf("failed to kubectl get nodes. args %q : %v", rr.Command(), err)
}
if strings.Count(rr.Stdout.String(), "True") != 2 {
t.Errorf("expected 2 nodes Ready status to be True, got %v", rr.Output())
if strings.Count(rr.Stdout.String(), "True") != 3 {
t.Errorf("expected 3 nodes Ready status to be True, got %v", rr.Output())
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册