MCPcopy Create free account
hub / github.com/conforma/cli / Persisted

Function Persisted

acceptance/testenv/testenv.go:89–96  ·  view source on GitHub ↗

Persisted returns true if the test environment persists after the test has finished

(ctx context.Context)

Source from the content-addressed store, hash-verified

87
88// Persisted returns true if the test environment persists after the test has finished
89func Persisted(ctx context.Context) bool {
90 persist, ok := ctx.Value(PersistStubEnvironment).(bool)
91
92 // if we're either not persisting or we ran in restored environment, this is
93 // to allow the environment to persist and not require both -persist and -restore
94 // to be specified, i.e. when running with -restore, -persist is assumed
95 return ok && persist || Restored(ctx)
96}
97
98// Restored returns true if the test environment is restored from the last persisted environment
99func Restored(ctx context.Context) bool {

Callers 9

AddStepsToFunction · 0.92
AddStepsToFunction · 0.92
InitializeSuiteFunction · 0.92
AddStepsToFunction · 0.92
setupKeysFunction · 0.92
setupKubernetesFunction · 0.92
logExecutionFunction · 0.92
PersistFunction · 0.85
TestContainersRequestFunction · 0.85

Calls 1

RestoredFunction · 0.85

Tested by 1

TestContainersRequestFunction · 0.68