word -> line

pull/6672/head
aallbright 2020-02-18 19:00:57 -05:00
parent ff873d2728
commit addb2e623e
1 changed files with 4 additions and 4 deletions

View File

@ -500,13 +500,13 @@ func validateProfileCmd(ctx context.Context, t *testing.T, profile string) {
if err != nil {
t.Errorf("%s failed: %v", rr.Args, err)
}
for _, word := range []string{fmt.Sprintf("Created a new profile : %s", nonexistentProfile), fmt.Sprintf("minikube profile was successfully set to %s", nonexistentProfile)} {
if strings.Contains(rr.Stdout.String(), word) {
for _, line := range []string{fmt.Sprintf("Created a new profile : %s", nonexistentProfile), fmt.Sprintf("minikube profile was successfully set to %s", nonexistentProfile)} {
if strings.Contains(rr.Stdout.String(), line) {
t.Errorf("minikube profile should not create a nonexistent profile")
}
}
for _, word := range []string{fmt.Sprintf("profile \"%s\" not found", nonexistentProfile), fmt.Sprintf("if you want to create a profile you can by this command: minikube start -p %s", nonexistentProfile)} {
if !strings.Contains(rr.Stderr.String(), word) {
for _, line := range []string{fmt.Sprintf("profile \"%s\" not found", nonexistentProfile), fmt.Sprintf("if you want to create a profile you can by this command: minikube start -p %s", nonexistentProfile)} {
if !strings.Contains(rr.Stderr.String(), line) {
t.Errorf("minikube profile should provide guidance on how to create a nonexistent profile")
}
}