fix pause start test

pull/7672/head
Medya Gh 2020-04-14 22:55:20 -07:00
parent 2447837faf
commit 36bfdeab7b
1 changed files with 5 additions and 5 deletions

View File

@ -41,8 +41,8 @@ func TestPause(t *testing.T) {
{"Start", validateFreshStart}, {"Start", validateFreshStart},
{"Pause", validatePause}, {"Pause", validatePause},
{"Unpause", validateUnpause}, {"Unpause", validateUnpause},
{"Pause Again", validatePause}, {"PauseAgain", validatePause},
{"delete", validateDelete}, {"DeletePaused", validateDelete},
} }
for _, tc := range tests { for _, tc := range tests {
tc := tc tc := tc
@ -63,7 +63,7 @@ func validateFreshStart(ctx context.Context, t *testing.T, profile string) {
} }
func validatePause(ctx context.Context, t *testing.T, profile string) { func validatePause(ctx context.Context, t *testing.T, profile string) {
args := append([]string{"pause", "-p", profile, "--alsologtostderr", "-v=5"}, StartArgs()...) args := []string{"pause", "-p", profile, "--alsologtostderr", "-v=5"}
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil { if err != nil {
t.Errorf("failed to pause minikube with args: %q : %v", rr.Command(), err) t.Errorf("failed to pause minikube with args: %q : %v", rr.Command(), err)
@ -71,7 +71,7 @@ func validatePause(ctx context.Context, t *testing.T, profile string) {
} }
func validateUnpause(ctx context.Context, t *testing.T, profile string) { func validateUnpause(ctx context.Context, t *testing.T, profile string) {
args := append([]string{"unpause", "-p", profile, "--alsologtostderr", "-v=5"}, StartArgs()...) args := []string{"unpause", "-p", profile, "--alsologtostderr", "-v=5"}
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil { if err != nil {
t.Errorf("failed to unpause minikube with args: %q : %v", rr.Command(), err) t.Errorf("failed to unpause minikube with args: %q : %v", rr.Command(), err)
@ -80,7 +80,7 @@ func validateUnpause(ctx context.Context, t *testing.T, profile string) {
func validateDelete(ctx context.Context, t *testing.T, profile string) { func validateDelete(ctx context.Context, t *testing.T, profile string) {
// vervose logging because this might go wrong, if container get stuck // vervose logging because this might go wrong, if container get stuck
args := append([]string{"delete", "-p", profile, "--alsologtostderr", "-v=5"}, StartArgs()...) args := []string{"delete", "-p", profile, "--alsologtostderr", "-v=5"}
rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) rr, err := Run(t, exec.CommandContext(ctx, Target(), args...))
if err != nil { if err != nil {
t.Errorf("failed to delete minikube with args: %q : %v", rr.Command(), err) t.Errorf("failed to delete minikube with args: %q : %v", rr.Command(), err)