Skip to content

Commit

Permalink
🩹 Assert not production in integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
H1rono committed Jun 7, 2024
1 parent a2b2c56 commit 4a1dd63
Showing 1 changed file with 4 additions and 23 deletions.
27 changes: 4 additions & 23 deletions integration_tests/handler/0_utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,30 +32,11 @@ func injectAPIServer(t *testing.T, c *config.Config, db *gorm.DB) (handler.API,
knoqAPI external.KnoqAPI
)

// TODO: 初期リリースではPortalとknoQとは連携しない
if c.IsProduction {
var err error

// portalAPI, err = external.NewPortalAPI(c.Portal)
// if err != nil {
// return handler.API{}, err
// }
portalAPI = external.NewNopPortalAPI()

traQAPI, err = external.NewTraQAPI(c.Traq)
if err != nil {
return handler.API{}, err
}
assert.False(t, c.IsProduction)

knoqAPI, err = external.NewKnoqAPI(c.Knoq)
if err != nil {
return handler.API{}, err
}
} else {
portalAPI = mock_external_e2e.NewMockPortalAPI()
traQAPI = mock_external_e2e.NewMockTraQAPI()
knoqAPI = mock_external_e2e.NewMockKnoqAPI()
}
portalAPI = mock_external_e2e.NewMockPortalAPI()
traQAPI = mock_external_e2e.NewMockTraQAPI()
knoqAPI = mock_external_e2e.NewMockKnoqAPI()

// repository
userRepo := repository.NewUserRepository(db, portalAPI, traQAPI)
Expand Down

0 comments on commit 4a1dd63

Please sign in to comment.