Skip to content

Commit 7070bc5

Browse files
committed
fix: update test files to pass required input structs to List methods
1 parent 59bc757 commit 7070bc5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

cmd/profiles_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func TestProfilesList_Empty(t *testing.T) {
8686
buf := captureProfilesOutput(t)
8787
fake := &FakeProfilesService{}
8888
p := ProfilesCmd{profiles: fake}
89-
_ = p.List(context.Background())
89+
_ = p.List(context.Background(), ProfilesListInput{})
9090
assert.Contains(t, buf.String(), "No profiles found")
9191
}
9292

@@ -96,7 +96,7 @@ func TestProfilesList_WithRows(t *testing.T) {
9696
rows := []kernel.Profile{{ID: "p1", Name: "alpha", CreatedAt: created, UpdatedAt: created}, {ID: "p2", Name: "", CreatedAt: created, UpdatedAt: created}}
9797
fake := &FakeProfilesService{ListFunc: func(ctx context.Context, opts ...option.RequestOption) (*[]kernel.Profile, error) { return &rows, nil }}
9898
p := ProfilesCmd{profiles: fake}
99-
_ = p.List(context.Background())
99+
_ = p.List(context.Background(), ProfilesListInput{})
100100
out := buf.String()
101101
assert.Contains(t, out, "p1")
102102
assert.Contains(t, out, "alpha")

cmd/proxies/list_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ func TestProxyList_Empty(t *testing.T) {
2020
}
2121

2222
p := ProxyCmd{proxies: fake}
23-
err := p.List(context.Background())
23+
err := p.List(context.Background(), ProxyListInput{})
2424

2525
assert.NoError(t, err)
2626
assert.Contains(t, buf.String(), "No proxy configurations found")
@@ -59,7 +59,7 @@ func TestProxyList_WithProxies(t *testing.T) {
5959
}
6060

6161
p := ProxyCmd{proxies: fake}
62-
err := p.List(context.Background())
62+
err := p.List(context.Background(), ProxyListInput{})
6363

6464
assert.NoError(t, err)
6565
output := buf.String()
@@ -101,7 +101,7 @@ func TestProxyList_Error(t *testing.T) {
101101
}
102102

103103
p := ProxyCmd{proxies: fake}
104-
err := p.List(context.Background())
104+
err := p.List(context.Background(), ProxyListInput{})
105105

106106
assert.Error(t, err)
107107
assert.Contains(t, err.Error(), "API error")

0 commit comments

Comments
 (0)