From d3f2a75a67a11b4052f23f997a96996716134e1f Mon Sep 17 00:00:00 2001 From: Vivek Date: Fri, 13 Sep 2024 06:54:51 +0530 Subject: [PATCH] chore: handle new error on return from internalCheck() --- wait/host_port.go | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/wait/host_port.go b/wait/host_port.go index 174fdb3ddd1..b3a8fd29506 100644 --- a/wait/host_port.go +++ b/wait/host_port.go @@ -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 }