@@ -41,8 +41,6 @@ const (
41
41
tagTestAttachZoneOnHostsTags = 0x40
42
42
)
43
43
44
- const wildcardDNS = "nip.io"
45
-
46
44
func validIPIInstallConfig () * types.InstallConfig {
47
45
return & types.InstallConfig {
48
46
Networking : & types.Networking {
@@ -630,19 +628,7 @@ func Test_ensureDNS(t *testing.T) {
630
628
name string
631
629
installConfig * types.InstallConfig
632
630
expectErr string
633
- }{
634
- {
635
- name : "valid dns" ,
636
- installConfig : func () * types.InstallConfig {
637
- installConfig := validIPIInstallConfig ()
638
- installConfig .ObjectMeta .Name = "0a000803"
639
- installConfig .BaseDomain = wildcardDNS
640
-
641
- return installConfig
642
- }(),
643
- expectErr : `` ,
644
- },
645
- }
631
+ }{}
646
632
for _ , test := range tests {
647
633
t .Run (test .name , func (t * testing.T ) {
648
634
err := ensureDNS (test .installConfig , platformFieldPath , resolver ).ToAggregate ()
@@ -707,38 +693,8 @@ func Test_ensureLoadBalancer(t *testing.T) {
707
693
stopTCPListen bool
708
694
expectLevel string
709
695
expectWarn string
710
- }{
711
- {
712
- name : "valid lb" ,
713
- installConfig : func () * types.InstallConfig {
714
- installConfig := validIPIInstallConfig ()
715
- installConfig .ObjectMeta .Name = "7f000001"
716
- installConfig .BaseDomain = wildcardDNS
717
- installConfig .VSphere .APIVIPs = []string {}
718
- installConfig .VSphere .IngressVIPs = []string {}
719
-
720
- return installConfig
721
- }(),
722
- stopTCPListen : false ,
723
- expectLevel : `` ,
724
- expectWarn : `` ,
725
- },
726
- {
727
- name : "warn lb" ,
728
- installConfig : func () * types.InstallConfig {
729
- installConfig := validIPIInstallConfig ()
730
- installConfig .ObjectMeta .Name = "7f000002"
731
- installConfig .BaseDomain = wildcardDNS
732
- installConfig .VSphere .APIVIPs = []string {}
733
- installConfig .VSphere .IngressVIPs = []string {}
734
-
735
- return installConfig
736
- }(),
737
- stopTCPListen : true ,
738
- expectLevel : `warning` ,
739
- expectWarn : `Installation may fail, load balancer not available: dial tcp 127.0.0.2:6443: connect: connection refused` ,
740
- },
741
- }
696
+ }{}
697
+
742
698
for _ , test := range tests {
743
699
t .Run (test .name , func (t * testing.T ) {
744
700
if test .stopTCPListen {
0 commit comments