diff --git a/test/integration/functional_test.go b/test/integration/functional_test.go index 45a1b6b43a..c160c73fb8 100644 --- a/test/integration/functional_test.go +++ b/test/integration/functional_test.go @@ -563,31 +563,14 @@ func validateAddonsCmd(ctx context.Context, t *testing.T, profile string) { } } - // Custom format - rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "list", "--format", `"{{.AddonName}}":"{{.AddonStatus}}"`)) + // Table output + rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "list")) if err != nil { t.Errorf("%s failed: %v", rr.Args, err) } - listLines = strings.Split(strings.TrimSpace(rr.Stdout.String()), "\n") - r = regexp.MustCompile(`"[a-z|-]+":"(enabled|disabled)"`) - for _, line := range listLines { - match := r.MatchString(line) - if !match { - t.Errorf("Plugin output did not match expected custom format. Got: %s", line) - } - } - - // Custom format shorthand - rr, err = Run(t, exec.CommandContext(ctx, Target(), "-p", profile, "addons", "list", "-f", `"{{.AddonName}}":"{{.AddonStatus}}"`)) - if err != nil { - t.Errorf("%s failed: %v", rr.Args, err) - } - listLines = strings.Split(strings.TrimSpace(rr.Stdout.String()), "\n") - r = regexp.MustCompile(`"[a-z|-]+":"(enabled|disabled)"`) - for _, line := range listLines { - match := r.MatchString(line) - if !match { - t.Errorf("Plugin output did not match expected custom format. Got: %s", line) + for _, a := range []string{"dashboard", "ingress", "ingress-dns"} { + if !strings.Contains(rr.Output(), a) { + t.Errorf("addon list expected to include %q but didn't output: %q", a, rr.Output()) } }