MCPcopy Create free account
hub / github.com/Facets-cloud/flow / TestBackgroundLauncherForGate

Function TestBackgroundLauncherForGate

internal/app/background_test.go:280–291  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

278func (nonBGHarness) Name() harness.Name { return harness.Name("codex") }
279
280func TestBackgroundLauncherForGate(t *testing.T) {
281 if _, err := backgroundLauncherFor(claude.New()); err != nil {
282 t.Errorf("claude must implement BackgroundLauncher: %v", err)
283 }
284 _, err := backgroundLauncherFor(nonBGHarness{})
285 if err == nil {
286 t.Fatalf("non-bg harness must error (clean capability gate)")
287 }
288 if !strings.Contains(err.Error(), "codex") {
289 t.Errorf("gate error should name the harness, got: %v", err)
290 }
291}
292
293// TestBGAgentStatus: a claude-bound task whose session is in the registry
294// resolves to its live agent (status/state/pid); absent or session-less

Callers

nothing calls this directly

Calls 3

NewFunction · 0.92
backgroundLauncherForFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected