MCPcopy
hub / github.com/crowdsecurity/crowdsec / getDBClient

Function getDBClient

pkg/database/allowlists_test.go:19–30  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context)

Source from the content-addressed store, hash-verified

17)
18
19func getDBClient(t *testing.T, ctx context.Context) *Client {
20 t.Helper()
21
22 dbClient, err := NewClient(ctx, &csconfig.DatabaseCfg{
23 Type: "sqlite",
24 DbName: "crowdsec",
25 DbPath: ":memory:",
26 }, nil)
27 require.NoError(t, err)
28
29 return dbClient
30}
31
32func TestCheckAllowlist(t *testing.T) {
33 ctx := t.Context()

Calls 1

NewClientFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…