diff --git a/keps/0007-command-asserts.md b/keps/0007-command-asserts.md index 684a11fe..b8f31b02 100644 --- a/keps/0007-command-asserts.md +++ b/keps/0007-command-asserts.md @@ -8,8 +8,8 @@ owners: - "@nfnt" - "@kensipe" creation-date: 2020-10-28 -last-updated: 2021-02-04 -status: implementable +last-updated: 2021-09-02 +status: implemented --- # Assertions for CLI commands diff --git a/pkg/file/files.go b/pkg/file/files.go index d4aaa4f3..df94ad30 100644 --- a/pkg/file/files.go +++ b/pkg/file/files.go @@ -19,7 +19,7 @@ func ToObjects(paths []string) ([]client.Object, error) { for _, path := range paths { objs, err := testutils.LoadYAMLFromFile(path) if err != nil { - return nil, fmt.Errorf("file %q load yaml error", path) + return nil, fmt.Errorf("file %q load yaml error: %w", path, err) } apply = append(apply, objs...) } diff --git a/pkg/http/http.go b/pkg/http/http.go index 4bda7c3e..534c799b 100644 --- a/pkg/http/http.go +++ b/pkg/http/http.go @@ -28,7 +28,7 @@ func ToObjects(urlPath string) ([]client.Object, error) { objs, err := testutils.LoadYAML(urlPath, buf) if err != nil { - return nil, fmt.Errorf("url %q load yaml error", urlPath) + return nil, fmt.Errorf("url %q load yaml error: %w", urlPath, err) } apply = append(apply, objs...) diff --git a/pkg/kuttlctl/cmd/test.go b/pkg/kuttlctl/cmd/test.go index 01dbae88..a97b949a 100644 --- a/pkg/kuttlctl/cmd/test.go +++ b/pkg/kuttlctl/cmd/test.go @@ -233,7 +233,7 @@ For more detailed documentation, visit: https://kuttl.dev`, }, } - testCmd.Flags().StringVar(&configPath, "config", "", "Path to file to load test settings from (must not be set with any other arguments).") + testCmd.Flags().StringVar(&configPath, "config", "", "Path to file to load base test settings from (these may be overridden with command-line arguments).") testCmd.Flags().StringVar(&crdDir, "crd-dir", "", "Directory to load CustomResourceDefinitions from prior to running the tests.") testCmd.Flags().StringSliceVar(&manifestDirs, "manifest-dir", []string{}, "One or more directories containing manifests to apply before running the tests.") testCmd.Flags().StringVar(&testToRun, "test", "", "If set, the specific test case to run.")