context propagation: pass context to NewAPIC() (#3231)

This commit is contained in:
mmetc 2024-09-19 11:09:29 +02:00 committed by GitHub
parent 7c5d4d8b3d
commit be391a3da8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 13 additions and 9 deletions

View file

@ -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)
})
}