Skip to content

Commit

Permalink
fix: init reaper in all branches
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Jun 18, 2024
1 parent 470d817 commit f51511c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions reaper.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,10 @@ func NewReaper(ctx context.Context, sessionID string) (*Reaper, error) {
return nil, err
}
} else if state.Running {
// update the reaper instance
tcreaper.InitReaper(reaperInstance.Endpoint, reaperInstance.SessionID)
reaperInstance.Container.Printf("🔥 Reaper obtained from this test session %s", sessionID)

return reaperInstance, nil
}
// else: the reaper instance has been terminated, so we need to create a new one
Expand All @@ -190,6 +193,10 @@ func NewReaper(ctx context.Context, sessionID string) (*Reaper, error) {
if err != nil {
return nil, err
}

// update the reaper instance
tcreaper.InitReaper(reaperInstance.Endpoint, reaperInstance.SessionID)

return reaperInstance, nil
}

Expand Down

0 comments on commit f51511c

Please sign in to comment.