Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
phm07 committed Dec 12, 2023
1 parent 857c88c commit f88a7b1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cmd/server/list_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ func TestList(t *testing.T) {
hcloud.ServerListOpts{
ListOpts: hcloud.ListOpts{PerPage: 50},
Sort: []string{"id:asc"},
Status: []hcloud.ServerStatus{hcloud.ServerStatusRunning},
},
).
Return([]*hcloud.Server{
Expand All @@ -45,7 +46,7 @@ func TestList(t *testing.T) {
},
}, nil)

out, _, err := fx.Run(cmd, []string{})
out, _, err := fx.Run(cmd, []string{"--status", "running"})

expOut := `ID NAME STATUS IPV4 IPV6 PRIVATE NET DATACENTER AGE
123 test running 192.168.2.1 - - fsn1-dc14 20s
Expand Down

0 comments on commit f88a7b1

Please sign in to comment.