Skip to content

Commit 83df813

Browse files
committed
WIP - compare status update, not the message
1 parent eda974b commit 83df813

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

internal/k8s/configuration_vsr_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"testing"
55

66
"github.com/google/go-cmp/cmp"
7+
"github.com/google/go-cmp/cmp/cmpopts"
78
conf_v1 "github.com/nginxinc/kubernetes-ingress/pkg/apis/configuration/v1"
89
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
910
)
@@ -176,10 +177,10 @@ func TestAttemptToAddVSRtoNotExistingVS_ReturnsProblems(t *testing.T) {
176177
}
177178

178179
changes, problems := configuration.AddOrUpdateVirtualServerRoute(vsr)
179-
if !cmp.Equal(expectedChanges, changes) {
180+
if !cmp.Equal(expectedChanges, changes, cmpopts.IgnoreFields(ConfigurationProblem{}, "Message")) {
180181
t.Error(cmp.Diff(expectedChanges, changes))
181182
}
182-
if !cmp.Equal(expectedProblems, problems) {
183+
if !cmp.Equal(expectedProblems, problems, cmpopts.IgnoreFields(ConfigurationProblem{}, "Message")) {
183184
t.Error(cmp.Diff(expectedProblems, problems))
184185
}
185186
}

0 commit comments

Comments
 (0)