mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 12:25:53 +02:00
context propagation: pass context to NewAPIC() (#3231)
This commit is contained in:
parent
7c5d4d8b3d
commit
be391a3da8
4 changed files with 13 additions and 9 deletions
|
@ -230,6 +230,8 @@ func TestNewAPIC(t *testing.T) {
|
|||
},
|
||||
}
|
||||
|
||||
ctx := context.Background()
|
||||
|
||||
for _, tc := range tests {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
setConfig()
|
||||
|
@ -246,7 +248,7 @@ func TestNewAPIC(t *testing.T) {
|
|||
),
|
||||
))
|
||||
tc.action()
|
||||
_, err := NewAPIC(testConfig, tc.args.dbClient, tc.args.consoleConfig, nil)
|
||||
_, err := NewAPIC(ctx, testConfig, tc.args.dbClient, tc.args.consoleConfig, nil)
|
||||
cstest.RequireErrorContains(t, err, tc.expectedErr)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue