@@ -115,7 +115,10 @@ o/aoxqmE0mN1lyCPOa9UP//LlsREkWVKI3+Wld/xERtzf66hjcH+ilsXDxxpMEXo
115115bSiPJQsGIKtQvyCaZY2szyOoeUGgOId+He7ITlezxKrjdj+1pLMESvAxKeo=
116116-----END RSA PRIVATE KEY-----`
117117
118- const drop string = "DROP"
118+ const (
119+ drop string = "DROP"
120+ defaultSubnet string = "default"
121+ )
119122
120123func TestCCMLoadBalancers (t * testing.T ) {
121124 testCases := []struct {
@@ -555,14 +558,14 @@ func testCreateNodeBalancerWithVPCBackend(t *testing.T, client *linodego.Client,
555558 Options .SubnetNames = subnetNames
556559 }()
557560 Options .VPCNames = "test1"
558- Options .SubnetNames = "default"
561+ Options .SubnetNames = defaultSubnet
559562 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
560563 Label : "test1" ,
561564 Description : "" ,
562565 Region : "us-west" ,
563566 Subnets : []linodego.VPCSubnetCreateOptions {
564567 {
565- Label : "default" ,
568+ Label : defaultSubnet ,
566569 IPv4 : "10.0.0.0/8" ,
567570 },
568571 },
@@ -597,14 +600,14 @@ func testUpdateNodeBalancerWithVPCBackend(t *testing.T, client *linodego.Client,
597600 Options .SubnetNames = subnetNames
598601 }()
599602 Options .VPCNames = "test1"
600- Options .SubnetNames = "default"
603+ Options .SubnetNames = defaultSubnet
601604 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
602605 Label : "test1" ,
603606 Description : "" ,
604607 Region : "us-west" ,
605608 Subnets : []linodego.VPCSubnetCreateOptions {
606609 {
607- Label : "default" ,
610+ Label : defaultSubnet ,
608611 IPv4 : "10.0.0.0/8" ,
609612 },
610613 },
@@ -684,15 +687,15 @@ func testCreateNodeBalancerWithVPCOnlySubnetFlag(t *testing.T, client *linodego.
684687 Options .NodeBalancerBackendIPv4Subnet = nbBackendSubnet
685688 }()
686689 Options .VPCNames = "test-subflag"
687- Options .SubnetNames = "default"
690+ Options .SubnetNames = defaultSubnet
688691 Options .NodeBalancerBackendIPv4Subnet = "10.254.0.0/24"
689692 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
690693 Label : "test-subflag" ,
691694 Description : "" ,
692695 Region : "us-west" ,
693696 Subnets : []linodego.VPCSubnetCreateOptions {
694697 {
695- Label : "default" ,
698+ Label : defaultSubnet ,
696699 IPv4 : "10.0.0.0/8" ,
697700 },
698701 },
@@ -778,14 +781,14 @@ func testCreateNodeBalancerWithVPCNoFlagOrAnnotation(t *testing.T, client *linod
778781 Options .SubnetNames = subnetNames
779782 }()
780783 Options .VPCNames = "test-noflags"
781- Options .SubnetNames = "default"
784+ Options .SubnetNames = defaultSubnet
782785 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
783786 Label : "test-noflags" ,
784787 Description : "" ,
785788 Region : "us-west" ,
786789 Subnets : []linodego.VPCSubnetCreateOptions {
787790 {
788- Label : "default" ,
791+ Label : defaultSubnet ,
789792 IPv4 : "10.0.0.0/8" ,
790793 },
791794 },
@@ -861,14 +864,14 @@ func testCreateNodeBalancerWithVPCAnnotationOnly(t *testing.T, client *linodego.
861864 Options .SubnetNames = subnetNames
862865 }()
863866 Options .VPCNames = "test-onlyannotation"
864- Options .SubnetNames = "default"
867+ Options .SubnetNames = defaultSubnet
865868 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
866869 Label : "test-onlyannotation" ,
867870 Description : "" ,
868871 Region : "us-west" ,
869872 Subnets : []linodego.VPCSubnetCreateOptions {
870873 {
871- Label : "default" ,
874+ Label : defaultSubnet ,
872875 IPv4 : "10.0.0.0/8" ,
873876 },
874877 {
@@ -950,15 +953,15 @@ func testCreateNodeBalancerWithVPCOnlySubnetIDFlag(t *testing.T, client *linodeg
950953 Options .NodeBalancerBackendIPv4SubnetID = nbBackendSubnetID
951954 }()
952955 Options .VPCNames = "test1"
953- Options .SubnetNames = "default"
956+ Options .SubnetNames = defaultSubnet
954957 Options .NodeBalancerBackendIPv4SubnetID = 1111
955958 _ , _ = client .CreateVPC (t .Context (), linodego.VPCCreateOptions {
956959 Label : "test-subid-flag" ,
957960 Description : "" ,
958961 Region : "us-west" ,
959962 Subnets : []linodego.VPCSubnetCreateOptions {
960963 {
961- Label : "default" ,
964+ Label : defaultSubnet ,
962965 IPv4 : "10.0.0.0/8" ,
963966 },
964967 },
@@ -1044,7 +1047,7 @@ func testCreateNodeBalancerWithVPCAnnotationOverwrite(t *testing.T, client *lino
10441047 Region : "us-west" ,
10451048 Subnets : []linodego.VPCSubnetCreateOptions {
10461049 {
1047- Label : "default" ,
1050+ Label : defaultSubnet ,
10481051 IPv4 : "10.0.0.0/8" ,
10491052 },
10501053 },
0 commit comments