Skip to content

Commit

Permalink
Merge pull request #843 from forta-network/ali/fix-e2e-test
Browse files Browse the repository at this point in the history
Add batch request support to e2e public API
  • Loading branch information
aomerk authored Jan 10, 2024
2 parents e006130 + 90f8b88 commit c097d7f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ replace github.com/docker/docker => github.com/moby/moby v20.10.25+incompatible
require (
github.com/docker/docker v1.6.2
github.com/docker/go-connections v0.4.0
github.com/forta-network/forta-core-go v0.0.0-20240109131528-202eb541caab
github.com/forta-network/forta-core-go v0.0.0-20240110111218-b4b8774d2bb6
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.39.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,8 @@ github.com/flynn/noise v0.0.0-20180327030543-2492fe189ae6/go.mod h1:1i71OnUq3iUe
github.com/flynn/noise v1.0.0 h1:DlTHqmzmvcEiKj+4RYo/imoswx/4r6iBlCMfVtrMXpQ=
github.com/flynn/noise v1.0.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
github.com/forta-network/forta-core-go v0.0.0-20240109131528-202eb541caab h1:1TKaah1hDfDw9s8jk82xTAXHaxhiwuYWU1/Eu2R694Y=
github.com/forta-network/forta-core-go v0.0.0-20240109131528-202eb541caab/go.mod h1:iNehCWOypwVeO8b1GKmsrEWReHTvO5qw8SsGvZsBINo=
github.com/forta-network/forta-core-go v0.0.0-20240110111218-b4b8774d2bb6 h1:fDydEruBxtBYrWG5ct+YPwXuJiuUrT+QRU6A8Xz3ids=
github.com/forta-network/forta-core-go v0.0.0-20240110111218-b4b8774d2bb6/go.mod h1:iNehCWOypwVeO8b1GKmsrEWReHTvO5qw8SsGvZsBINo=
github.com/forta-network/go-multicall v0.0.0-20230609185354-1436386c6707 h1:f6I7K43i2m6AwHSsDxh0Mf3qFzYt8BKnabSl/zGFmh0=
github.com/forta-network/go-multicall v0.0.0-20230609185354-1436386c6707/go.mod h1:nqTUF1REklpWLZ/M5HfzqhSHNz4dPVKzJvbLziqTZpw=
github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHquHwclZch5g=
Expand Down
2 changes: 1 addition & 1 deletion tests/e2e/agents/combinerbot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,5 @@ func queryPublicAPI(ctx context.Context, bot string) ([]*protocol.AlertEvent, er
)
graphqlClient := graphql.NewClient(publicAPIAddr)

return graphqlClient.GetAlerts(ctx, &graphql.AlertsInput{Bots: []string{bot}}, nil)
return graphqlClient.GetAlertsBatch(ctx, []*graphql.AlertsInput{{Bots: []string{bot}}}, nil)
}
2 changes: 1 addition & 1 deletion testutils/graphql-api/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ type AlertData struct {
}

type AlertResponse struct {
Alerts AlertData `json:"alerts"`
Alerts AlertData `json:"alerts0"`
}

type Response struct {
Expand Down

0 comments on commit c097d7f

Please sign in to comment.