@@ -1543,6 +1543,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
15431543 m .ModifyTargetGroupAttributes (gomock .Any (), gomock .Eq (& elbv2.ModifyTargetGroupAttributesInput {
15441544 TargetGroupArn : aws .String (tgArn ),
15451545 Attributes : []elbv2types.TargetGroupAttribute {
1546+ {
1547+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
1548+ Value : aws .String ("false" ),
1549+ },
1550+ {
1551+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
1552+ Value : aws .String ("300" ),
1553+ },
15461554 {
15471555 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
15481556 Value : aws .String ("false" ),
@@ -1661,6 +1669,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
16611669 m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
16621670 TargetGroupArn : aws .String (tgArn ),
16631671 Attributes : []elbv2types.TargetGroupAttribute {
1672+ {
1673+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
1674+ Value : aws .String ("false" ),
1675+ },
1676+ {
1677+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
1678+ Value : aws .String ("300" ),
1679+ },
16641680 {
16651681 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
16661682 Value : aws .String ("false" ),
@@ -1767,6 +1783,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
17671783 m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
17681784 TargetGroupArn : aws .String (tgArn ),
17691785 Attributes : []elbv2types.TargetGroupAttribute {
1786+ {
1787+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
1788+ Value : aws .String ("false" ),
1789+ },
1790+ {
1791+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
1792+ Value : aws .String ("300" ),
1793+ },
17701794 {
17711795 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
17721796 Value : aws .String ("false" ),
@@ -1860,6 +1884,19 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
18601884 },
18611885 },
18621886 }, nil )
1887+ m .ModifyTargetGroupAttributes (gomock .Any (), gomock .Eq (& elbv2.ModifyTargetGroupAttributesInput {
1888+ TargetGroupArn : aws .String (tgArn ),
1889+ Attributes : []elbv2types.TargetGroupAttribute {
1890+ {
1891+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
1892+ Value : aws .String ("false" ),
1893+ },
1894+ {
1895+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
1896+ Value : aws .String ("300" ),
1897+ },
1898+ },
1899+ })).Return (nil , nil )
18631900 m .DescribeListeners (gomock .Any (), & elbv2.DescribeListenersInput {
18641901 LoadBalancerArn : aws .String (elbArn ),
18651902 }).Return (& elbv2.DescribeListenersOutput {
@@ -2000,6 +2037,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
20002037 m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
20012038 TargetGroupArn : aws .String (tgArn ),
20022039 Attributes : []elbv2types.TargetGroupAttribute {
2040+ {
2041+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
2042+ Value : aws .String ("false" ),
2043+ },
2044+ {
2045+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
2046+ Value : aws .String ("300" ),
2047+ },
20032048 {
20042049 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
20052050 Value : aws .String ("false" ),
@@ -2115,6 +2160,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
21152160 m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
21162161 TargetGroupArn : aws .String (tgArn ),
21172162 Attributes : []elbv2types.TargetGroupAttribute {
2163+ {
2164+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
2165+ Value : aws .String ("false" ),
2166+ },
2167+ {
2168+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
2169+ Value : aws .String ("300" ),
2170+ },
21182171 {
21192172 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
21202173 Value : aws .String ("false" ),
@@ -2403,6 +2456,14 @@ func TestReconcileV2LB(t *testing.T) {
24032456 m .ModifyTargetGroupAttributes (gomock .Any (), gomock .Eq (& elbv2.ModifyTargetGroupAttributesInput {
24042457 TargetGroupArn : aws .String (tgArn ),
24052458 Attributes : []elbv2types.TargetGroupAttribute {
2459+ {
2460+ Key : aws .String (infrav1 .TargetGroupAttributeEnableConnectionTermination ),
2461+ Value : aws .String ("false" ),
2462+ },
2463+ {
2464+ Key : aws .String (infrav1 .TargetGroupAttributeUnhealthyDrainingIntervalSeconds ),
2465+ Value : aws .String ("300" ),
2466+ },
24062467 {
24072468 Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
24082469 Value : aws .String ("false" ),
0 commit comments