Skip to content

Commit

Permalink
chore: handle new error on return from internalCheck()
Browse files Browse the repository at this point in the history
  • Loading branch information
vchandela committed Sep 13, 2024
1 parent b6949e4 commit d3f2a75
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions wait/host_port.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,17 @@ func (hp *HostPortStrategy) WaitUntilReady(ctx context.Context, target StrategyT
}

if err = internalCheck(ctx, internalPort, target); err != nil {
if errors.Is(errShellNotExecutable, err) {
switch {
case errors.Is(err, errShellNotExecutable):
log.Println("Shell not executable in container, only external port validated")
return nil
case errors.Is(err, errShellNotFound):
log.Println("Shell not found in container")
return nil
default:
return fmt.Errorf("internal check: %w", err)
}

return fmt.Errorf("internal check: %w", err)
}
}

return nil
}
Expand Down

0 comments on commit d3f2a75

Please sign in to comment.