We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 943e0c7 commit e2f45f4Copy full SHA for e2f45f4
test/integration/portforward.go
@@ -75,7 +75,7 @@ func NewPortForwarder(restConfig *rest.Config, logger logger, opts PortForwardin
75
76
func (p *PortForwarder) Forward(ctx context.Context) error {
77
var podName string
78
- if p.opts.PodName != "" {
+ if p.opts.PodName == "" {
79
pods, err := p.clientset.CoreV1().Pods(p.opts.Namespace).List(ctx, metav1.ListOptions{LabelSelector: p.opts.LabelSelector, FieldSelector: "status.phase=Running"})
80
if err != nil {
81
return fmt.Errorf("could not list pods in %q with label %q: %w", p.opts.Namespace, p.opts.LabelSelector, err)
0 commit comments