@@ -29,14 +29,16 @@ func TestLoadBalancers_GetLoadBalancer(t *testing.T) {
2929 {
3030 Name : "get load balancer without host name IPv6 disabled" ,
3131 ServiceUID : "1" ,
32- ServiceAnnotations : map [annotation.Name ]interface {} {
33- annotation .LBIPv6Disabled : true ,
32+ ServiceAnnotations : map [annotation.Name ]string {
33+ annotation .LBIPv6Disabled : " true" ,
3434 },
3535 LB : & hcloud.LoadBalancer {
3636 ID : 1 ,
3737 Name : "no-host-name" ,
3838 PublicNet : hcloud.LoadBalancerPublicNet {
39- IPv4 : hcloud.LoadBalancerPublicNetIPv4 {IP : net .ParseIP ("1.2.3.4" )},
39+ Enabled : true ,
40+ IPv4 : hcloud.LoadBalancerPublicNetIPv4 {IP : net .ParseIP ("1.2.3.4" )},
41+ IPv6 : hcloud.LoadBalancerPublicNetIPv6 {IP : net .ParseIP ("fe80::1" )},
4042 },
4143 },
4244 Mock : func (_ * testing.T , tt * LoadBalancerTestCase ) {
@@ -62,8 +64,9 @@ func TestLoadBalancers_GetLoadBalancer(t *testing.T) {
6264 ID : 1 ,
6365 Name : "no-host-name" ,
6466 PublicNet : hcloud.LoadBalancerPublicNet {
65- IPv4 : hcloud.LoadBalancerPublicNetIPv4 {IP : net .ParseIP ("1.2.3.4" )},
66- IPv6 : hcloud.LoadBalancerPublicNetIPv6 {IP : net .ParseIP ("fe80::1" )},
67+ Enabled : true ,
68+ IPv4 : hcloud.LoadBalancerPublicNetIPv4 {IP : net .ParseIP ("1.2.3.4" )},
69+ IPv6 : hcloud.LoadBalancerPublicNetIPv6 {IP : net .ParseIP ("fe80::1" )},
6770 },
6871 },
6972 Mock : func (_ * testing.T , tt * LoadBalancerTestCase ) {
@@ -91,7 +94,7 @@ func TestLoadBalancers_GetLoadBalancer(t *testing.T) {
9194 On ("GetByK8SServiceUID" , tt .Ctx , tt .Service ).
9295 Return (tt .LB , nil )
9396 },
94- ServiceAnnotations : map [annotation.Name ]interface {} {
97+ ServiceAnnotations : map [annotation.Name ]string {
9598 annotation .LBHostname : "hostname" ,
9699 },
97100 Perform : func (t * testing.T , tt * LoadBalancerTestCase ) {
@@ -261,9 +264,9 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
261264 {
262265 Name : "public network only no ipv6" ,
263266 ServiceUID : "2" ,
264- ServiceAnnotations : map [annotation.Name ]interface {} {
267+ ServiceAnnotations : map [annotation.Name ]string {
265268 annotation .LBName : "pub-net-only-no-ipv6" ,
266- annotation .LBIPv6Disabled : true ,
269+ annotation .LBIPv6Disabled : " true" ,
267270 },
268271 LB : & hcloud.LoadBalancer {
269272 ID : 1 ,
@@ -292,7 +295,7 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
292295 {
293296 Name : "public network only" ,
294297 ServiceUID : "2" ,
295- ServiceAnnotations : map [annotation.Name ]interface {} {
298+ ServiceAnnotations : map [annotation.Name ]string {
296299 annotation .LBName : "pub-net-only" ,
297300 },
298301 LB : & hcloud.LoadBalancer {
@@ -325,7 +328,7 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
325328 Name : "attach Load Balancer to public and private network" ,
326329 NetworkID : 4711 ,
327330 ServiceUID : "3" ,
328- ServiceAnnotations : map [annotation.Name ]interface {} {
331+ ServiceAnnotations : map [annotation.Name ]string {
329332 annotation .LBName : "with-priv-net" ,
330333 },
331334 LB : & hcloud.LoadBalancer {
@@ -368,7 +371,7 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
368371 Name : "disable private ingress via default" ,
369372 NetworkID : 4711 ,
370373 ServiceUID : "5" ,
371- ServiceAnnotations : map [annotation.Name ]interface {} {
374+ ServiceAnnotations : map [annotation.Name ]string {
372375 annotation .LBName : "with-priv-net-no-priv-ingress" ,
373376 },
374377 DisablePrivateIngressDefault : true ,
@@ -411,9 +414,9 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
411414 Name : "disable private ingress via annotation" ,
412415 NetworkID : 4711 ,
413416 ServiceUID : "5" ,
414- ServiceAnnotations : map [annotation.Name ]interface {} {
417+ ServiceAnnotations : map [annotation.Name ]string {
415418 annotation .LBName : "with-priv-net-no-priv-ingress" ,
416- annotation .LBDisablePrivateIngress : true ,
419+ annotation .LBDisablePrivateIngress : " true" ,
417420 },
418421 LB : & hcloud.LoadBalancer {
419422 ID : 1 ,
@@ -454,9 +457,9 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
454457 Name : "attach Load Balancer to private network only" ,
455458 NetworkID : 4711 ,
456459 ServiceUID : "6" ,
457- ServiceAnnotations : map [annotation.Name ]interface {} {
460+ ServiceAnnotations : map [annotation.Name ]string {
458461 annotation .LBName : "priv-net-only" ,
459- annotation .LBDisablePublicNetwork : true ,
462+ annotation .LBDisablePublicNetwork : " true" ,
460463 },
461464 LB : & hcloud.LoadBalancer {
462465 ID : 1 ,
@@ -508,7 +511,7 @@ func TestLoadBalancers_EnsureLoadBalancer_CreateLoadBalancer(t *testing.T) {
508511 Name : "attach Load Balancer to public and private network (with proxy protocol)" ,
509512 NetworkID : 4711 ,
510513 ServiceUID : "3" ,
511- ServiceAnnotations : map [annotation.Name ]interface {} {
514+ ServiceAnnotations : map [annotation.Name ]string {
512515 annotation .LBName : "with-priv-net" ,
513516 annotation .LBSvcProxyProtocol : "true" ,
514517 },
@@ -558,7 +561,7 @@ func TestLoadBalancer_EnsureLoadBalancer_UpdateLoadBalancer(t *testing.T) {
558561 {
559562 Name : "Load balancer unchanged" ,
560563 ServiceUID : "1" ,
561- ServiceAnnotations : map [annotation.Name ]interface {} {
564+ ServiceAnnotations : map [annotation.Name ]string {
562565 annotation .LBName : "test-lb" ,
563566 },
564567 LB : & hcloud.LoadBalancer {
@@ -580,7 +583,7 @@ func TestLoadBalancer_EnsureLoadBalancer_UpdateLoadBalancer(t *testing.T) {
580583 {
581584 Name : "Load balancer changed" ,
582585 ServiceUID : "2" ,
583- ServiceAnnotations : map [annotation.Name ]interface {} {
586+ ServiceAnnotations : map [annotation.Name ]string {
584587 annotation .LBName : "test-lb" ,
585588 },
586589 LB : & hcloud.LoadBalancer {
@@ -603,7 +606,7 @@ func TestLoadBalancer_EnsureLoadBalancer_UpdateLoadBalancer(t *testing.T) {
603606 {
604607 Name : "Load balancer targets changed" ,
605608 ServiceUID : "3" ,
606- ServiceAnnotations : map [annotation.Name ]interface {} {
609+ ServiceAnnotations : map [annotation.Name ]string {
607610 annotation .LBName : "test-lb" ,
608611 },
609612 LB : & hcloud.LoadBalancer {
@@ -626,7 +629,7 @@ func TestLoadBalancer_EnsureLoadBalancer_UpdateLoadBalancer(t *testing.T) {
626629 {
627630 Name : "Load balancer services changed" ,
628631 ServiceUID : "4" ,
629- ServiceAnnotations : map [annotation.Name ]interface {} {
632+ ServiceAnnotations : map [annotation.Name ]string {
630633 annotation .LBName : "test-lb" ,
631634 },
632635 LB : & hcloud.LoadBalancer {
@@ -649,7 +652,7 @@ func TestLoadBalancer_EnsureLoadBalancer_UpdateLoadBalancer(t *testing.T) {
649652 {
650653 Name : "fall back to load balancer name" ,
651654 ServiceUID : "5" ,
652- ServiceAnnotations : map [annotation.Name ]interface {} {
655+ ServiceAnnotations : map [annotation.Name ]string {
653656 annotation .LBName : "pre-existing-lb" ,
654657 },
655658 LB : & hcloud.LoadBalancer {
@@ -681,7 +684,7 @@ func TestLoadBalancer_UpdateLoadBalancer(t *testing.T) {
681684 {
682685 Name : "Load Balancer not found" ,
683686 ServiceUID : "1" ,
684- ServiceAnnotations : map [annotation.Name ]interface {} {
687+ ServiceAnnotations : map [annotation.Name ]string {
685688 annotation .LBName : "test-lb" ,
686689 },
687690 Mock : func (_ * testing.T , tt * LoadBalancerTestCase ) {
@@ -696,7 +699,7 @@ func TestLoadBalancer_UpdateLoadBalancer(t *testing.T) {
696699 {
697700 Name : "calls all reconcilement ops" ,
698701 ServiceUID : "2" ,
699- ServiceAnnotations : map [annotation.Name ]interface {} {
702+ ServiceAnnotations : map [annotation.Name ]string {
700703 annotation .LBName : "test-lb" ,
701704 },
702705 LB : & hcloud.LoadBalancer {
@@ -718,7 +721,7 @@ func TestLoadBalancer_UpdateLoadBalancer(t *testing.T) {
718721 {
719722 Name : "fall back to load balancer name" ,
720723 ServiceUID : "3" ,
721- ServiceAnnotations : map [annotation.Name ]interface {} {
724+ ServiceAnnotations : map [annotation.Name ]string {
722725 annotation .LBName : "previously-created-lb" ,
723726 },
724727 LB : & hcloud.LoadBalancer {
0 commit comments