Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for external bundle validators #5525

Merged
merged 14 commits into from
Apr 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions internal/cmd/operator-sdk/bundle/validate/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,11 @@ To validate a bundle against the validator for Good Practices specifically, in a

To validate a bundle against the (alpha) validator for Deprecated APIs specifically, in addition to required bundle validators:

$ operator-sdk bundle validate ./bundle --select-optional name=alpha-deprecated-apis --optional-values=k8s-version=1.22
$ operator-sdk bundle validate ./bundle --select-optional name=alpha-deprecated-apis --optional-values=k8s-version=1.22

To validate a bundle against an external validator, in addition to required bundle validators:

$ operator-sdk bundle validate ./bundle --alpha-select-external /path/to/external-validator[:/path/to/optional-second-validator]
jmrodri marked this conversation as resolved.
Show resolved Hide resolved
`
)

Expand Down Expand Up @@ -139,11 +143,15 @@ func NewCmd() *cobra.Command {
if err != nil {
logger.Fatal(err)
}
if err := result.PrintWithFormat(c.outputFormat); err != nil {
failed, err := result.PrintWithFormat(c.outputFormat)
if err != nil {
logger.Fatal(err)
}

logger.Info("All validation tests have completed successfully")
// if a test failed don't print that it was successful
if !failed {
logger.Info("All validation tests have completed successfully")
}

return nil
},
Expand Down
288 changes: 0 additions & 288 deletions internal/cmd/operator-sdk/bundle/validate/internal/result_test.go

This file was deleted.

Loading