Skip to content

Commit 60c079b

Browse files
committed
fix: ignore unexported sync.Mutex field when comparing portForwardEntry
1 parent 0cf3fc5 commit 60c079b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

pkg/skaffold/kubernetes/portforward/resource_forwarder_test.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"time"
2626

2727
"github.com/google/go-cmp/cmp"
28+
"github.com/google/go-cmp/cmp/cmpopts"
2829
v1 "k8s.io/api/core/v1"
2930
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
3031
"k8s.io/apimachinery/pkg/runtime"
@@ -218,7 +219,7 @@ func TestGetCurrentEntryFunc(t *testing.T) {
218219

219220
expectedEntry := test.expected
220221
expectedEntry.resource = test.resource
221-
t.CheckDeepEqual(expectedEntry, actualEntry, cmp.AllowUnexported(portForwardEntry{}, sync.Mutex{}))
222+
t.CheckDeepEqual(expectedEntry, actualEntry, cmp.AllowUnexported(portForwardEntry{}), cmpopts.IgnoreUnexported(sync.Mutex{}))
222223
})
223224
}
224225
}

0 commit comments

Comments
 (0)