File tree Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Expand file tree Collapse file tree 2 files changed +7
-16
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,8 @@ func TestRuleReconcile(t *testing.T) {
354
354
}
355
355
356
356
func genTG (arn , svcname string ) * tg.TargetGroup {
357
+ albelbv2 .ELBV2svc = mockedELBV2 {}
358
+
357
359
t , _ := tg .NewCurrentTargetGroup (& tg.NewCurrentTargetGroupOptions {
358
360
ALBNamePrefix : "pfx" ,
359
361
LoadBalancerID : "nnnnn" ,
@@ -755,3 +757,7 @@ func (m mockedELBV2) ModifyRule(input *elbv2.ModifyRuleInput) (*elbv2.ModifyRule
755
757
func (m mockedELBV2 ) DeleteRule (input * elbv2.DeleteRuleInput ) (* elbv2.DeleteRuleOutput , error ) {
756
758
return & m .DeleteRuleOutput , m .DeleteRuleError
757
759
}
760
+
761
+ func (m mockedELBV2 ) DescribeTargetGroupAttributesFiltered (s * string ) (albelbv2.TargetGroupAttributes , error ) {
762
+ return nil , nil
763
+ }
Original file line number Diff line number Diff line change @@ -184,21 +184,6 @@ func TestHealthcheckSecondsValidation(t *testing.T) {
184
184
}
185
185
}
186
186
187
- // Should fail when idle timeout is not in range 1-3600. Should succeed otherwise.
188
- func TestConnectionIdleTimeoutValidation (t * testing.T ) {
189
- a := & Annotations {}
190
-
191
- err := a .setConnectionIdleTimeout (map [string ]string {connectionIdleTimeoutKey : "15" })
192
- if err != nil || a .ConnectionIdleTimeout == aws .Int64 (0 ) {
193
- t .Error ("Failed to set connection idle timeout when value was correct." )
194
- }
195
-
196
- err = a .setConnectionIdleTimeout (map [string ]string {connectionIdleTimeoutKey : "3700" })
197
- if err == nil {
198
- t .Error ("Succeeded setting connection idle timeout when value was incorrect" )
199
- }
200
- }
201
-
202
187
func TestSetLoadBalancerAttributes (t * testing.T ) {
203
188
var tests = []struct {
204
189
annotations map [string ]string
@@ -299,7 +284,7 @@ func TestSetTargetGroupAttributes(t *testing.T) {
299
284
annotations := & Annotations {}
300
285
attributes := map [string ]string {targetGroupAttributesKey : "deregistration_delay.timeout_seconds=60,stickiness.enabled=true" }
301
286
err := annotations .setTargetGroupAttributes (attributes )
302
- if err != nil || len (annotations .TargetGroupAttributes ) != 5 {
287
+ if err != nil || len (annotations .TargetGroupAttributes ) != 2 {
303
288
t .Errorf ("setTargetGroupAttributes - number of attributes incorrect" )
304
289
}
305
290
You can’t perform that action at this time.
0 commit comments