Skip to content

Commit

Permalink
fix: Add tls flag to test command
Browse files Browse the repository at this point in the history
The pull command uses TLS by default by way of the value set for the `tls` flag.  This change updates the `--update` flag on the test command to use TLS by default to align with the pull command.

Signed-off-by: Matt Snyder <[email protected]>
  • Loading branch information
oblogic7 authored Jan 19, 2024
1 parent 82fd2db commit e21c872
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/commands/test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ func NewTestCommand(ctx context.Context) *cobra.Command {
return fmt.Errorf("bind flag: %w", err)
}
}
if err := viper.BindPFlag("tls", cmd.Flags().Lookup("tls")); err != nil {
return fmt.Errorf("bind flag: %w", err)
}

return nil
},
Expand Down Expand Up @@ -185,6 +188,7 @@ func NewTestCommand(ctx context.Context) *cobra.Command {
cmd.Flags().StringSliceP("data", "d", []string{}, "A list of paths from which data for the rego policies will be recursively loaded")

cmd.Flags().StringSlice("proto-file-dirs", []string{}, "A list of directories containing Protocol Buffer definitions")

cmd.Flags().BoolP("tls", "s", true, "Use TLS to access the registry")

Check failure on line 192 in internal/commands/test.go

View workflow job for this annotation

GitHub Actions / validate

File is not `gofmt`-ed with `-s` (gofmt)
return &cmd
}

0 comments on commit e21c872

Please sign in to comment.