MCPcopy
hub / github.com/crowdsecurity/crowdsec / InitMachineTest

Function InitMachineTest

pkg/apiserver/alerts_test.go:80–85  ·  view source on GitHub ↗
(t *testing.T, ctx context.Context)

Source from the content-addressed store, hash-verified

78}
79
80func InitMachineTest(t *testing.T, ctx context.Context) (*gin.Engine, models.WatcherAuthResponse, csconfig.Config) {
81 router, config := NewAPITest(t, ctx)
82 loginResp := LoginToTestAPI(t, ctx, router, config)
83
84 return router, loginResp, config
85}
86
87func LoginToTestAPI(t *testing.T, ctx context.Context, router *gin.Engine, config csconfig.Config) models.WatcherAuthResponse {
88 body := CreateTestMachine(t, ctx, router, "")

Callers 1

SetupLAPITestFunction · 0.85

Calls 2

NewAPITestFunction · 0.85
LoginToTestAPIFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…