From f88a7b198f9e51602cde373c694ec3168c9252c3 Mon Sep 17 00:00:00 2001 From: pauhull Date: Tue, 12 Dec 2023 12:12:20 +0100 Subject: [PATCH] Add test --- internal/cmd/server/list_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/cmd/server/list_test.go b/internal/cmd/server/list_test.go index 98f5d369..19aa89e3 100644 --- a/internal/cmd/server/list_test.go +++ b/internal/cmd/server/list_test.go @@ -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{ @@ -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