mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
Add support for centralized allowlists (#3355)
This commit is contained in:
parent
8a10e2c61d
commit
16d0677938
64 changed files with 11540 additions and 152 deletions
|
@ -297,7 +297,7 @@ func CreateTestMachine(t *testing.T, ctx context.Context, router *gin.Engine, to
|
|||
return body
|
||||
}
|
||||
|
||||
func CreateTestBouncer(t *testing.T, ctx context.Context, config *csconfig.DatabaseCfg) string {
|
||||
func CreateTestBouncer(t *testing.T, ctx context.Context, config *csconfig.DatabaseCfg) (string, *database.Client) {
|
||||
dbClient, err := database.NewClient(ctx, config)
|
||||
require.NoError(t, err)
|
||||
|
||||
|
@ -307,7 +307,7 @@ func CreateTestBouncer(t *testing.T, ctx context.Context, config *csconfig.Datab
|
|||
_, err = dbClient.CreateBouncer(ctx, "test", "127.0.0.1", middlewares.HashSHA512(apiKey), types.ApiKeyAuthType, false)
|
||||
require.NoError(t, err)
|
||||
|
||||
return apiKey
|
||||
return apiKey, dbClient
|
||||
}
|
||||
|
||||
func TestWithWrongDBConfig(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue