(t *testing.T)
| 287 | } |
| 288 | |
| 289 | func 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,确保内部锁没问题。 |
| 302 | func TestManager_ConcurrentApply(t *testing.T) { |
nothing calls this directly
no test coverage detected