Skip to content

Commit

Permalink
fixup! Remove count on ListResult
Browse files Browse the repository at this point in the history
  • Loading branch information
pangea-andrest committed Oct 9, 2024
1 parent 2785a4c commit a28bd4e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion pangea-sdk/v3/service/vault/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ type ListItemData struct {

type ListResult struct {
Items []ListItemData `json:"items"`
Count int `json:"count"` // Total number of items matching the given query
Last string `json:"last,omitempty"` // Internal ID returned in the previous look up response. Used for pagination.
}

Expand Down
4 changes: 2 additions & 2 deletions pangea-sdk/v3/service/vault/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,7 @@ func Test_List_And_Delete(t *testing.T) {
assert.NoError(t, err)
assert.NotNil(t, lresp)

assert.Greater(t, lresp.Result.Count, 0)
assert.Greater(t, len(lresp.Result.Items), 0)
for _, i := range lresp.Result.Items {
if i.ID != "" && i.Type != "folder" && i.Folder != "/service-tokens/" {
dresp, err := client.Delete(ctx, &vault.DeleteRequest{
Expand Down Expand Up @@ -1126,7 +1126,7 @@ func Test_Integration_Folders(t *testing.T) {
},
)
assert.NoError(t, err)
assert.Equal(t, 1, lr.Result.Count)
assert.Equal(t, 1, len(lr.Result.Items))
assert.Equal(t, FOLDER_NAME_NEW, lr.Result.Items[0].Name)
assert.Equal(t, fcr.Result.ID, lr.Result.Items[0].ID)

Expand Down

0 comments on commit a28bd4e

Please sign in to comment.