mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
context propagation: pkg/csplugin (#3273)
This commit is contained in:
parent
50d115b914
commit
8ff58ee74e
11 changed files with 66 additions and 33 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue