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

Fix printing test results on error #218

Merged
merged 1 commit into from
Mar 28, 2020
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
3 changes: 2 additions & 1 deletion ct/cmd/install.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,12 @@ func install(cmd *cobra.Command, args []string) error {
fmt.Println(err)
}
results, err := testing.InstallCharts()
testing.PrintResults(results)

if err != nil {
return fmt.Errorf("Error installing charts: %s", err)
}

fmt.Println("All charts installed successfully")
testing.PrintResults(results)
return nil
}
3 changes: 2 additions & 1 deletion ct/cmd/lint.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,12 @@ func lint(cmd *cobra.Command, args []string) error {
return err
}
results, err := testing.LintCharts()
testing.PrintResults(results)

if err != nil {
return fmt.Errorf("Error linting charts: %s", err)
}

fmt.Println("All charts linted successfully")
testing.PrintResults(results)
return nil
}
3 changes: 2 additions & 1 deletion ct/cmd/lintAndInstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,12 @@ func lintAndInstall(cmd *cobra.Command, args []string) error {
return err
}
results, err := testing.LintAndInstallCharts()
testing.PrintResults(results)

if err != nil {
return fmt.Errorf("Error linting and installing charts: %s", err)
}

fmt.Println("All charts linted and installed successfully")
testing.PrintResults(results)
return nil
}
1 change: 1 addition & 0 deletions ct/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ func NewRootCmd() *cobra.Command {
* all charts

in given chart directories.`),
SilenceUsage: true,
}

cmd.AddCommand(newLintCmd())
Expand Down