@@ -619,6 +619,7 @@ func TestBuildBackendTLSPolicyStatuses(t *testing.T) {
619619 getBackendTLSPolicy := func (
620620 name string ,
621621 valid bool ,
622+ ignored bool ,
622623 isReferenced bool ,
623624 conditions []conditions.Condition ,
624625 ) * graph.BackendTLSPolicy {
@@ -631,15 +632,15 @@ func TestBuildBackendTLSPolicyStatuses(t *testing.T) {
631632 },
632633 },
633634 Valid : valid ,
635+ Ignored : ignored ,
634636 IsReferenced : isReferenced ,
635637 Conditions : conditions ,
636638 Gateway : types.NamespacedName {Name : "gateway" , Namespace : "test" },
637639 }
638640 }
639641
640- attachedConds := []conditions.Condition {staticConds .NewBackendTLSPolicyAttached ()}
642+ attachedConds := []conditions.Condition {staticConds .NewBackendTLSPolicyAccepted ()}
641643 invalidConds := []conditions.Condition {staticConds .NewBackendTLSPolicyInvalid ("invalid backendTLSPolicy" )}
642- ignoredConds := []conditions.Condition {staticConds .NewBackendTLSPolicyIgnored ("ignored backendTLSPolicy" )}
643644
644645 tests := []struct {
645646 backendTLSPolicies map [types.NamespacedName ]* graph.BackendTLSPolicy
@@ -653,7 +654,7 @@ func TestBuildBackendTLSPolicyStatuses(t *testing.T) {
653654 {
654655 name : "valid backendTLSPolicy" ,
655656 backendTLSPolicies : map [types.NamespacedName ]* graph.BackendTLSPolicy {
656- {Namespace : "test" , Name : "valid-bt" }: getBackendTLSPolicy ("valid-bt" , true , true , attachedConds ),
657+ {Namespace : "test" , Name : "valid-bt" }: getBackendTLSPolicy ("valid-bt" , true , false , true , attachedConds ),
657658 },
658659 expected : status.BackendTLSPolicyStatuses {
659660 {Namespace : "test" , Name : "valid-bt" }: {
@@ -669,7 +670,7 @@ func TestBuildBackendTLSPolicyStatuses(t *testing.T) {
669670 {
670671 name : "invalid backendTLSPolicy" ,
671672 backendTLSPolicies : map [types.NamespacedName ]* graph.BackendTLSPolicy {
672- {Namespace : "test" , Name : "invalid-bt" }: getBackendTLSPolicy ("invalid-bt" , false , true , invalidConds ),
673+ {Namespace : "test" , Name : "invalid-bt" }: getBackendTLSPolicy ("invalid-bt" , false , false , true , invalidConds ),
673674 },
674675 expected : status.BackendTLSPolicyStatuses {
675676 {Namespace : "test" , Name : "invalid-bt" }: {
@@ -685,16 +686,16 @@ func TestBuildBackendTLSPolicyStatuses(t *testing.T) {
685686 {
686687 name : "ignored or not referenced backendTLSPolicies" ,
687688 backendTLSPolicies : map [types.NamespacedName ]* graph.BackendTLSPolicy {
688- {Namespace : "test" , Name : "ignored-bt" }: getBackendTLSPolicy ("ignored-bt" , false , true , ignoredConds ),
689- {Namespace : "test" , Name : "not-referenced" }: getBackendTLSPolicy ("not-referenced" , true , false , nil ),
689+ {Namespace : "test" , Name : "ignored-bt" }: getBackendTLSPolicy ("ignored-bt" , false , true , true , nil ),
690+ {Namespace : "test" , Name : "not-referenced" }: getBackendTLSPolicy ("not-referenced" , true , false , false , nil ),
690691 },
691692 expected : status.BackendTLSPolicyStatuses {},
692693 },
693694 {
694695 name : "mix valid and ignored backendTLSPolicies" ,
695696 backendTLSPolicies : map [types.NamespacedName ]* graph.BackendTLSPolicy {
696- {Namespace : "test" , Name : "ignored-bt" }: getBackendTLSPolicy ("ignored-bt" , false , true , ignoredConds ),
697- {Namespace : "test" , Name : "valid-bt" }: getBackendTLSPolicy ("valid-bt" , true , true , attachedConds ),
697+ {Namespace : "test" , Name : "ignored-bt" }: getBackendTLSPolicy ("ignored-bt" , false , true , true , nil ),
698+ {Namespace : "test" , Name : "valid-bt" }: getBackendTLSPolicy ("valid-bt" , true , false , true , attachedConds ),
698699 },
699700 expected : status.BackendTLSPolicyStatuses {
700701 {Namespace : "test" , Name : "valid-bt" }: {
0 commit comments