Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions internal/components/setup/compose.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
"gopkg.in/yaml.v2"

"github.com/apache/skywalking-infra-e2e/internal/config"
"github.com/apache/skywalking-infra-e2e/internal/constant"
"github.com/apache/skywalking-infra-e2e/internal/logger"
"github.com/apache/skywalking-infra-e2e/internal/util"
)
Expand All @@ -55,6 +56,13 @@ func ComposeSetup(e2eConfig *config.E2EConfig) error {
util.ExportEnvVars(profilePath)
}

// Disable Ryuk reaper when cleanup.on is "never" so containers survive process exit.
if e2eConfig.Cleanup.On == constant.CleanUpNever {
if err := os.Setenv("TESTCONTAINERS_RYUK_DISABLED", "true"); err != nil {
return fmt.Errorf("failed to disable Ryuk reaper: %v", err)
}
}

// create compose stack
identifier := util.GetIdentity()
stack, err := compose.NewDockerComposeWith(
Expand Down
Loading