Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Galabov93 committed Apr 18, 2024
1 parent 7371d96 commit e211cd9
Show file tree
Hide file tree
Showing 5 changed files with 1,961 additions and 1,944 deletions.
2 changes: 1 addition & 1 deletion cmd/metalcloud-cli/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ func initClient(endpointSuffix string) (metalcloud.MetalCloudClient, error) {
return metalcloud.GetMetalcloudClientWithOptions(options)
}

func getHelp(clients map[string]metalcloud.MetalCloudClient, showArguments bool) string {
func getHelp(clients map[string]metalcloud.MetalCloudClient) string {
var sb strings.Builder
cmds := getCommands(clients)
for _, c := range cmds {
Expand Down
4 changes: 2 additions & 2 deletions cmd/metalcloud-cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ func main() {

if len(os.Args) < 2 {
//fmt.Fprintf(GetStdout(), "Invalid command! Use 'help' for a list of commands.\n")
fmt.Fprintf(configuration.GetStdout(), "%s\n", getHelp(clients, false))
fmt.Fprintf(configuration.GetStdout(), "%s\n", getHelp(clients))
os.Exit(-1)
}

if os.Args[1] == "help" {
fmt.Fprintf(configuration.GetStdout(), "%s\n", getHelp(clients, false))
fmt.Fprintf(configuration.GetStdout(), "%s\n", getHelp(clients))
os.Exit(0)
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/metalcloud-cli/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ func TestGetHelp(t *testing.T) {
}
cmds := getCommands(clients)

s := getHelp(clients, true)
s := getHelp(clients)
for _, c := range cmds {
Expect(s).To(ContainSubstring(c.Description))
}
Expand Down
Loading

0 comments on commit e211cd9

Please sign in to comment.