Skip to content

Commit

Permalink
Rename --fail-once to --failfast
Browse files Browse the repository at this point in the history
  • Loading branch information
jlandowner committed Dec 19, 2023
1 parent 3c79dee commit 2f9de8b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type option struct {
UpdateSnapshot bool
OutputDir string
DiffContextLineN int
FailOnce bool
FailFast bool
Parallelism int

// Below properties are the same as helm global options
Expand Down Expand Up @@ -162,7 +162,7 @@ MIT 2023 jlandowner/helm-chartsnap
panic(err)
}
rootCmd.PersistentFlags().IntVarP(&o.DiffContextLineN, "ctx-lines", "N", 3, "number of lines to show in diff output. 0 for full output")
rootCmd.PersistentFlags().BoolVar(&o.FailOnce, "fail-once", false, "fail once any test case failed")
rootCmd.PersistentFlags().BoolVar(&o.FailFast, "failfast", false, "fail once any test case failed")
rootCmd.PersistentFlags().IntVar(&o.Parallelism, "parallelism", -1, "test concurrency if taking multiple snapshots for a test value file directory. default is unlimited")

if err := rootCmd.Execute(); err != nil {
Expand Down Expand Up @@ -226,7 +226,7 @@ func run(cmd *cobra.Command, args []string) error {
}

eg, ctx := errgroup.WithContext(cmd.Context())
if !o.FailOnce {
if !o.FailFast {
// not cancel ctx even if some case failed
ctx = cmd.Context()
}
Expand Down

0 comments on commit 2f9de8b

Please sign in to comment.