Skip to content

Commit 2d27b42

Browse files
committed
chore: add some integration tests regarding api v1
1 parent 16362d4 commit 2d27b42

File tree

10 files changed

+841
-43
lines changed

10 files changed

+841
-43
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ require (
104104
github.com/buger/jsonparser v1.1.1 // indirect
105105
github.com/cenkalti/backoff/v4 v4.3.0 // indirect
106106
github.com/containerd/continuity v0.4.5 // indirect
107-
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc
107+
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
108108
github.com/dlclark/regexp2 v1.11.5 // indirect
109109
github.com/dnwe/otelsarama v0.0.0-20240308230250-9388d9d40bc0 // indirect
110110
github.com/docker/cli v27.4.1+incompatible // indirect

internal/api/v2/controllers_ledgers_list.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package v2
22

33
import (
4-
"github.com/davecgh/go-spew/spew"
54
"github.com/formancehq/ledger/internal/api/common"
65
storagecommon "github.com/formancehq/ledger/internal/storage/common"
76
"net/http"
@@ -22,7 +21,6 @@ func listLedgers(b system.Controller, paginationConfig common.PaginationConfig)
2221
return
2322
}
2423

25-
spew.Dump(rq)
2624
ledgers, err := b.ListLedgers(r.Context(), rq)
2725
if err != nil {
2826
switch {

internal/controller/ledger/mocks_test.go

Lines changed: 0 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

openapi.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ paths:
8888
additionalProperties: true
8989
example: metadata[key]=value1&metadata[a.nested.key]=value2
9090
responses:
91-
'200':
91+
'204':
9292
description: OK
9393
headers:
9494
Count:

openapi/v1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ paths:
9090
additionalProperties: true
9191
example: metadata[key]=value1&metadata[a.nested.key]=value2
9292
responses:
93-
'200':
93+
'204':
9494
description: OK
9595
headers:
9696
Count:

pkg/client/.speakeasy/gen.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
lockVersion: 2.0.0
22
id: a9ac79e1-e429-4ee3-96c4-ec973f19bec3
33
management:
4-
docChecksum: 97c4248e367a820c2225d188361a800c
4+
docChecksum: cf53669174b68bdafc357d6575035712
55
docVersion: v2
66
speakeasyVersion: 1.563.0
77
generationVersion: 2.629.1

pkg/client/v1.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ func (s *V1) CountAccounts(ctx context.Context, request operations.CountAccounts
611611
}
612612

613613
switch {
614-
case httpRes.StatusCode == 200:
614+
case httpRes.StatusCode == 204:
615615
res.Headers = httpRes.Header
616616

617617
default:

0 commit comments

Comments
 (0)