Skip to content

Commit

Permalink
chore: skip reaper tests if ryuk is disabled (#2582)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Jun 14, 2024
1 parent b646bba commit bd9ac42
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions reaper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,12 @@ func TestContainerTerminationWithoutReaper(t *testing.T) {
}

func Test_NewReaper(t *testing.T) {
config.Reset() // reset the config using the internal method to avoid the sync.Once
tcConfig := config.Read()
if tcConfig.RyukDisabled {
t.Skip("Ryuk is disabled, skipping test")
}

type cases struct {
name string
req ContainerRequest
Expand Down Expand Up @@ -588,6 +594,12 @@ func TestReaper_reuseItFromOtherTestProgramUsingDocker(t *testing.T) {
// already running for the same session id by returning its container instance
// instead.
func TestReaper_ReuseRunning(t *testing.T) {
config.Reset() // reset the config using the internal method to avoid the sync.Once
tcConfig := config.Read()
if tcConfig.RyukDisabled {
t.Skip("Ryuk is disabled, skipping test")
}

const concurrency = 64

timeout, cancel := context.WithTimeout(context.Background(), 5*time.Minute)
Expand Down

0 comments on commit bd9ac42

Please sign in to comment.