(t *testing.T)
| 21 | ) |
| 22 | |
| 23 | func getDBClient(t *testing.T) *database.Client { |
| 24 | t.Helper() |
| 25 | |
| 26 | ctx := t.Context() |
| 27 | |
| 28 | testDBClient, err := database.NewClient(ctx, &csconfig.DatabaseCfg{ |
| 29 | Type: "sqlite", |
| 30 | DbName: "crowdsec", |
| 31 | DbPath: ":memory:", |
| 32 | }, nil) |
| 33 | require.NoError(t, err) |
| 34 | |
| 35 | return testDBClient |
| 36 | } |
| 37 | |
| 38 | func TestVisitor(t *testing.T) { |
| 39 | err := Init(nil) |
no test coverage detected
searching dependent graphs…