Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

Commit

Permalink
Fix portforward unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanprodan committed Apr 2, 2020
1 parent 01a239a commit 9c13e34
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions pkg/portforward/portforward.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package portforward

// based on https://github.com/justinbarrick/go-k8s-portforward
// licensed under the Apache License 2.0

import (
"fmt"
Expand Down
5 changes: 3 additions & 2 deletions pkg/portforward/portforward_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package portforward

// based on https://github.com/justinbarrick/go-k8s-portforward
// licensed under the Apache License 2.0

import (
"testing"
Expand Down Expand Up @@ -61,7 +62,7 @@ func TestFindPodByLabelsNoneExist(t *testing.T) {

_, err := pf.findPodByLabels()
assert.NotNil(t, err)
assert.Equal(t, "Could not find pod for selector: labels \"name=flux\"", err.Error())
assert.Equal(t, "Could not find running pod for selector: labels \"name=flux\"", err.Error())
}

func TestFindPodByLabelsMultiple(t *testing.T) {
Expand Down Expand Up @@ -135,7 +136,7 @@ func TestFindPodByLabelsExpressionNotFound(t *testing.T) {

_, err := pf.findPodByLabels()
assert.NotNil(t, err)
assert.Equal(t, "Could not find pod for selector: labels \"name in (flux,fluxd)\"", err.Error())
assert.Equal(t, "Could not find running pod for selector: labels \"name in (flux,fluxd)\"", err.Error())
}

func TestGetPodNameNameSet(t *testing.T) {
Expand Down

0 comments on commit 9c13e34

Please sign in to comment.