Skip to content

Commit b9b3602

Browse files
fix(tests): add apisix.Client parameter to NewServer calls in test files
Co-Authored-By: Patrick Munis <pmunis@gmail.com>
1 parent 2282dca commit b9b3602

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

services/gateway/internal/api/integration_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"testing"
1010

1111
"github.com/gin-gonic/gin"
12+
"github.com/munisp/NGApp/services/gateway/internal/apisix"
1213
"github.com/munisp/NGApp/services/gateway/internal/config"
1314
"github.com/munisp/NGApp/services/gateway/internal/dapr"
1415
"github.com/munisp/NGApp/services/gateway/internal/fluvio"
@@ -55,8 +56,9 @@ func setupIntegrationServer() *gin.Engine {
5556
f := fluvio.NewClient(cfg.FluvioEndpoint)
5657
kc := keycloak.NewClient(cfg.KeycloakURL, cfg.KeycloakRealm, cfg.KeycloakClientID)
5758
p := permify.NewClient(cfg.PermifyEndpoint)
59+
a := apisix.NewClient(cfg.APISIXAdminURL, cfg.APISIXAdminKey)
5860

59-
srv := NewServer(cfg, k, r, t, tb, d, f, kc, p)
61+
srv := NewServer(cfg, k, r, t, tb, d, f, kc, p, a)
6062
return srv.SetupRoutes()
6163
}
6264

services/gateway/internal/api/server_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"testing"
99

1010
"github.com/gin-gonic/gin"
11+
"github.com/munisp/NGApp/services/gateway/internal/apisix"
1112
"github.com/munisp/NGApp/services/gateway/internal/config"
1213
"github.com/munisp/NGApp/services/gateway/internal/dapr"
1314
"github.com/munisp/NGApp/services/gateway/internal/fluvio"
@@ -47,8 +48,9 @@ func setupTestServer() (*Server, *gin.Engine) {
4748
f := fluvio.NewClient(cfg.FluvioEndpoint)
4849
kc := keycloak.NewClient(cfg.KeycloakURL, cfg.KeycloakRealm, cfg.KeycloakClientID)
4950
p := permify.NewClient(cfg.PermifyEndpoint)
51+
a := apisix.NewClient(cfg.APISIXAdminURL, cfg.APISIXAdminKey)
5052

51-
srv := NewServer(cfg, k, r, t, tb, d, f, kc, p)
53+
srv := NewServer(cfg, k, r, t, tb, d, f, kc, p, a)
5254
router := srv.SetupRoutes()
5355
return srv, router
5456
}

0 commit comments

Comments
 (0)