diff --git a/internal/k8s/service/resolver_test.go b/internal/k8s/service/resolver_test.go index a362ed9ef..e29901287 100644 --- a/internal/k8s/service/resolver_test.go +++ b/internal/k8s/service/resolver_test.go @@ -28,6 +28,9 @@ func TestResolutionErrors_Add(t *testing.T) { r.Add(NewInvalidKindError("invalidkind error")) assert.Equal(t, getLengthAtErrorType(r, InvalidKindErrorType), 1) + + r.Add(NewBackendNotFoundError("backendnotfound error")) + assert.Equal(t, getLengthAtErrorType(r, BackendNotFoundErrorType), 1) } func TestResolutionErrors_Flatten(t *testing.T) { @@ -69,6 +72,18 @@ func TestResolutionErrors_Flatten(t *testing.T) { }, }, }, + { + name: "backendnotfound error", + want: BackendNotFoundErrorType, + wantErr: true, + fields: fields{ + errors: map[ServiceResolutionErrorType][]ResolutionError{ + BackendNotFoundErrorType: { + NewBackendNotFoundError("expected"), + }, + }, + }, + }, { name: "generic error", want: GenericResolutionErrorType, @@ -159,6 +174,17 @@ func TestResolutionErrors_Empty(t *testing.T) { }, }, }, + { + name: "backendnotfound error", + want: false, + fields: fields{ + errors: map[ServiceResolutionErrorType][]ResolutionError{ + BackendNotFoundErrorType: { + NewBackendNotFoundError("expected"), + }, + }, + }, + }, { name: "generic error", want: false,