@@ -1543,6 +1543,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
1543
1543
m .ModifyTargetGroupAttributes (gomock .Any (), gomock .Eq (& elbv2.ModifyTargetGroupAttributesInput {
1544
1544
TargetGroupArn : aws .String (tgArn ),
1545
1545
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
+ },
1546
1554
{
1547
1555
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
1548
1556
Value : aws .String ("false" ),
@@ -1661,6 +1669,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
1661
1669
m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
1662
1670
TargetGroupArn : aws .String (tgArn ),
1663
1671
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
+ },
1664
1680
{
1665
1681
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
1666
1682
Value : aws .String ("false" ),
@@ -1767,6 +1783,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
1767
1783
m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
1768
1784
TargetGroupArn : aws .String (tgArn ),
1769
1785
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
+ },
1770
1794
{
1771
1795
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
1772
1796
Value : aws .String ("false" ),
@@ -1860,6 +1884,19 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
1860
1884
},
1861
1885
},
1862
1886
}, 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 )
1863
1900
m .DescribeListeners (gomock .Any (), & elbv2.DescribeListenersInput {
1864
1901
LoadBalancerArn : aws .String (elbArn ),
1865
1902
}).Return (& elbv2.DescribeListenersOutput {
@@ -2000,6 +2037,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
2000
2037
m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
2001
2038
TargetGroupArn : aws .String (tgArn ),
2002
2039
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
+ },
2003
2048
{
2004
2049
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
2005
2050
Value : aws .String ("false" ),
@@ -2115,6 +2160,14 @@ func TestReconcileTargetGroupsAndListeners(t *testing.T) {
2115
2160
m .ModifyTargetGroupAttributes (gomock .Any (), & elbv2.ModifyTargetGroupAttributesInput {
2116
2161
TargetGroupArn : aws .String (tgArn ),
2117
2162
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
+ },
2118
2171
{
2119
2172
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
2120
2173
Value : aws .String ("false" ),
@@ -2403,6 +2456,14 @@ func TestReconcileV2LB(t *testing.T) {
2403
2456
m .ModifyTargetGroupAttributes (gomock .Any (), gomock .Eq (& elbv2.ModifyTargetGroupAttributesInput {
2404
2457
TargetGroupArn : aws .String (tgArn ),
2405
2458
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
+ },
2406
2467
{
2407
2468
Key : aws .String (infrav1 .TargetGroupAttributeEnablePreserveClientIP ),
2408
2469
Value : aws .String ("false" ),
0 commit comments