context propagation: pkg/csplugin (#3273)

This commit is contained in:
mmetc 2024-10-10 17:18:59 +02:00 committed by GitHub
parent 50d115b914
commit 8ff58ee74e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 66 additions and 33 deletions

View file

@ -72,8 +72,8 @@ func InitMachineTest(t *testing.T, ctx context.Context) (*gin.Engine, models.Wat
}
func LoginToTestAPI(t *testing.T, ctx context.Context, router *gin.Engine, config csconfig.Config) models.WatcherAuthResponse {
body := CreateTestMachine(t, router, "")
ValidateMachine(t, "test", config.API.Server.DbConfig)
body := CreateTestMachine(t, ctx, router, "")
ValidateMachine(t, ctx, "test", config.API.Server.DbConfig)
w := httptest.NewRecorder()
req, _ := http.NewRequestWithContext(ctx, http.MethodPost, "/v1/watchers/login", strings.NewReader(body))