Skip to content
4 changes: 3 additions & 1 deletion internal/pkg/cli/local_run.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,9 @@ func (o *localRunOpts) runPauseContainer(ctx context.Context, containerPorts map
errCh := make(chan error, 1)

go func() {
errCh <- o.dockerEngine.Run(ctx, runOptions)
if err := o.dockerEngine.Run(ctx, runOptions); err != nil {
errCh <- err
}
}()

// go routine to check if pause container is running
Expand Down
6 changes: 3 additions & 3 deletions internal/pkg/cli/local_run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
package cli

import (
"context"
"errors"
"fmt"
"testing"
Expand Down Expand Up @@ -365,8 +364,9 @@ func TestLocalRunOpts_Execute(t *testing.T) {
return []string{"mockFeature1"}
},
}
m.mockDockerEngine.EXPECT().IsContainerRunning(mockPauseContainerName)
m.mockDockerEngine.EXPECT().Run(context.Background(), gomock.Any()).Return(testError)
m.mockDockerEngine.EXPECT().IsContainerRunning(mockPauseContainerName).AnyTimes()
m.mockDockerEngine.EXPECT().Run(gomock.Any(), gomock.Any()).Return(testError)

},
wantedError: fmt.Errorf("run pause container: %w", testError),
},
Expand Down