Skip to content

Commit e2f45f4

Browse files
committed
pod name empty
1 parent 943e0c7 commit e2f45f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/integration/portforward.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func NewPortForwarder(restConfig *rest.Config, logger logger, opts PortForwardin
7575

7676
func (p *PortForwarder) Forward(ctx context.Context) error {
7777
var podName string
78-
if p.opts.PodName != "" {
78+
if p.opts.PodName == "" {
7979
pods, err := p.clientset.CoreV1().Pods(p.opts.Namespace).List(ctx, metav1.ListOptions{LabelSelector: p.opts.LabelSelector, FieldSelector: "status.phase=Running"})
8080
if err != nil {
8181
return fmt.Errorf("could not list pods in %q with label %q: %w", p.opts.Namespace, p.opts.LabelSelector, err)

0 commit comments

Comments
 (0)