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

Function TestContainersRequest

acceptance/testenv/testenv.go:249–258  ·  view source on GitHub ↗

TestContainersRequest modifies the req to keep the container running after the test if PersistStubEnvironment is set to true in the ctx

(ctx context.Context, req testcontainers.ContainerRequest)

Source from the content-addressed store, hash-verified

247
248// TestContainersRequest modifies the req to keep the container running after the test if PersistStubEnvironment is set to true in the ctx
249func TestContainersRequest(ctx context.Context, req testcontainers.ContainerRequest) testcontainers.ContainerRequest {
250 persisted := Persisted(ctx)
251
252 req.AutoRemove = !persisted
253 if persisted {
254 os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true")
255 }
256
257 return req
258}
259
260// CLIVersion returns the version of the CLI, useful for matching in snapshots
261func CLIVersion(ctx context.Context) (string, error) {

Callers 4

startStubRegistryFunction · 0.92
startStubGitServerFunction · 0.92
StartWiremockFunction · 0.92

Calls 1

PersistedFunction · 0.85

Tested by

no test coverage detected