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

Function stubBGMode

internal/app/background_test.go:79–85  ·  view source on GitHub ↗

stubBGMode forces spawner.IsBackground() true for the test.

(t *testing.T)

Source from the content-addressed store, hash-verified

77
78// stubBGMode forces spawner.IsBackground() true for the test.
79func stubBGMode(t *testing.T) {
80 t.Helper()
81 tru := true
82 old := spawner.BackgroundOverride
83 spawner.BackgroundOverride = &tru
84 t.Cleanup(func() { spawner.BackgroundOverride = old })
85}
86
87type bgCalls struct {
88 spawn, resume, agents int

Calls

no outgoing calls

Tested by

no test coverage detected