MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / TestManager_TerminatingNeedsCFToken

Function TestManager_TerminatingNeedsCFToken

internal/sniproxy/manager_test.go:289–299  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

287}
288
289func TestManager_TerminatingNeedsCFToken(t *testing.T) {
290 m := NewManager("")
291 defer m.Close()
292 err := m.Apply(ManagerConfig{
293 Listen: ":0",
294 Routes: []Route{{SNI: "x", Backend: "127.0.0.1:1", Mode: ModeTerminating}},
295 })
296 if err == nil {
297 t.Error("expected error when terminating route present but no CF token")
298 }
299}
300
301// TestManager_ConcurrentApply 用几个 goroutine 同时 Apply,确保内部锁没问题。
302func TestManager_ConcurrentApply(t *testing.T) {

Callers

nothing calls this directly

Calls 4

CloseMethod · 0.95
ApplyMethod · 0.95
NewManagerFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected