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

chore: Remove unneeded params passed to common.ValidateArgs function #138

Merged
merged 1 commit into from
Jan 29, 2024
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
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ var rootCmd = &cobra.Command{
} else if listImages {
service.PrintListImages(client.ClientSet)
} else {
common.ValidateArgs(client.ClientSet, config)
common.ValidateArgs()

service.RunE2E(client.ClientSet)
client.PrintE2ELogs()
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func PrintInfo(clientSet *kubernetes.Clientset, config *rest.Config) {

// ValidateArgs validates the arguments passed to the program
// and creates the output directory if it doesn't exist
func ValidateArgs(clientSet *kubernetes.Clientset, config *rest.Config) {
func ValidateArgs() {
if viper.Get("focus") == "" {
viper.Set("focus", "\\[Conformance\\]")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/common/args_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestValidateArgs(t *testing.T) {
viper.Set("extra-args", tc.extraArgs)

// Call the function under test
ValidateArgs(nil, nil)
ValidateArgs()
if viper.GetString("skip") != tc.expectedSkip {
t.Errorf("expected skip to be [%s], got [%s]", tc.expectedSkip, viper.GetString("skip"))
}
Expand Down