Skip to content

Commit 33f7afa

Browse files
committed
Refactor tests to use newly added type for NB Backend VPC
1 parent b227aeb commit 33f7afa

3 files changed

Lines changed: 49 additions & 49 deletions

File tree

test/integration/fixtures/TestNodeBalancer_Create_WithBackendVPCOnly.yaml

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ interactions:
378378
Content-Type:
379379
- application/json
380380
Expires:
381-
- Tue, 31 Mar 2026 12:47:32 GMT
381+
- Thu, 02 Apr 2026 07:54:33 GMT
382382
Pragma:
383383
- no-cache
384384
Strict-Transport-Security:
@@ -404,7 +404,7 @@ interactions:
404404
code: 200
405405
duration: ""
406406
- request:
407-
body: '{"label":"go-test-vpc-1774961252171678000","region":"nl-ams","subnets":[{"label":"linodego-vpc-test-1774961252530082000","ipv4":"192.168.0.0/25"}]}'
407+
body: '{"label":"go-test-vpc-1775116472687174000","region":"nl-ams","subnets":[{"label":"linodego-vpc-test-1775116473242703000","ipv4":"192.168.0.0/25"}]}'
408408
form: {}
409409
headers:
410410
Accept:
@@ -416,8 +416,8 @@ interactions:
416416
url: https://api.linode.com/v4beta/vpcs
417417
method: POST
418418
response:
419-
body: '{"id": 432829, "label": "go-test-vpc-1774961252171678000", "description":
420-
"", "region": "nl-ams", "ipv6": null, "subnets": [{"id": 541864, "label": "linodego-vpc-test-1774961252530082000",
419+
body: '{"id": 435793, "label": "go-test-vpc-1775116472687174000", "description":
420+
"", "region": "nl-ams", "ipv6": null, "subnets": [{"id": 547270, "label": "linodego-vpc-test-1775116473242703000",
421421
"ipv4": "192.168.0.0/25", "ipv6": null, "linodes": [], "databases": [], "nodebalancers":
422422
[], "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}], "created":
423423
"2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}'
@@ -445,7 +445,7 @@ interactions:
445445
Content-Type:
446446
- application/json
447447
Expires:
448-
- Tue, 31 Mar 2026 12:47:33 GMT
448+
- Thu, 02 Apr 2026 07:54:33 GMT
449449
Pragma:
450450
- no-cache
451451
Strict-Transport-Security:
@@ -469,7 +469,7 @@ interactions:
469469
code: 200
470470
duration: ""
471471
- request:
472-
body: '{"label":"go-test-def","region":"nl-ams","client_conn_throttle":20,"tags":null,"firewall_id":4054942,"backend_vpcs":[{"ipv4_range":"192.168.0.64/30","subnet_id":541864}]}'
472+
body: '{"label":"go-test-def","region":"nl-ams","client_conn_throttle":20,"tags":null,"firewall_id":4066926,"backend_vpcs":[{"ipv4_range":"192.168.0.64/30","subnet_id":547270}]}'
473473
form: {}
474474
headers:
475475
Accept:
@@ -481,8 +481,8 @@ interactions:
481481
url: https://api.linode.com/v4beta/nodebalancers
482482
method: POST
483483
response:
484-
body: '{"id": 2092330, "label": "go-test-def", "region": "nl-ams", "type": "common",
485-
"hostname": "172-233-36-75.ip.linodeusercontent.com", "ipv4": "172.233.36.75",
484+
body: '{"id": 2095943, "label": "go-test-def", "region": "nl-ams", "type": "common",
485+
"hostname": "172-233-35-203.ip.linodeusercontent.com", "ipv4": "172.233.35.203",
486486
"ipv6": "1234::5678", "frontend_address_type": "public", "frontend_vpc_subnet_id":
487487
null, "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05", "client_conn_throttle":
488488
20, "client_udp_sess_throttle": 0, "lke_cluster": null, "tags": [], "locks":
@@ -505,13 +505,13 @@ interactions:
505505
Connection:
506506
- keep-alive
507507
Content-Length:
508-
- "484"
508+
- "486"
509509
Content-Security-Policy:
510510
- default-src 'none'
511511
Content-Type:
512512
- application/json
513513
Expires:
514-
- Tue, 31 Mar 2026 12:47:33 GMT
514+
- Thu, 02 Apr 2026 07:54:34 GMT
515515
Pragma:
516516
- no-cache
517517
Strict-Transport-Security:
@@ -544,11 +544,11 @@ interactions:
544544
- application/json
545545
User-Agent:
546546
- linodego/dev https://github.com/linode/linodego
547-
url: https://api.linode.com/v4beta/nodebalancers/2092330/vpcs?page=1
547+
url: https://api.linode.com/v4beta/nodebalancers/2095943/vpcs?page=1
548548
method: GET
549549
response:
550-
body: '{"data": [{"id": 48481, "nodebalancer_id": 2092330, "vpc_id": 432829, "subnet_id":
551-
541864, "ipv4_range": "192.168.0.64/30", "ipv6_range": null, "purpose": "backend"}],
550+
body: '{"data": [{"id": 49027, "nodebalancer_id": 2095943, "vpc_id": 435793, "subnet_id":
551+
547270, "ipv4_range": "192.168.0.64/30", "ipv6_range": null, "purpose": "backend"}],
552552
"page": 1, "pages": 1, "results": 1}'
553553
headers:
554554
Access-Control-Allow-Credentials:
@@ -574,7 +574,7 @@ interactions:
574574
Content-Type:
575575
- application/json
576576
Expires:
577-
- Tue, 31 Mar 2026 12:47:33 GMT
577+
- Thu, 02 Apr 2026 07:54:34 GMT
578578
Pragma:
579579
- no-cache
580580
Strict-Transport-Security:
@@ -608,11 +608,11 @@ interactions:
608608
- application/json
609609
User-Agent:
610610
- linodego/dev https://github.com/linode/linodego
611-
url: https://api.linode.com/v4beta/nodebalancers/2092330/vpcs/48481
611+
url: https://api.linode.com/v4beta/nodebalancers/2095943/vpcs/49027
612612
method: GET
613613
response:
614-
body: '{"id": 48481, "nodebalancer_id": 2092330, "vpc_id": 432829, "subnet_id":
615-
541864, "ipv4_range": "192.168.0.64/30", "ipv6_range": null, "purpose": "backend"}'
614+
body: '{"id": 49027, "nodebalancer_id": 2095943, "vpc_id": 435793, "subnet_id":
615+
547270, "ipv4_range": "192.168.0.64/30", "ipv6_range": null, "purpose": "backend"}'
616616
headers:
617617
Access-Control-Allow-Credentials:
618618
- "true"
@@ -637,7 +637,7 @@ interactions:
637637
Content-Type:
638638
- application/json
639639
Expires:
640-
- Tue, 31 Mar 2026 12:47:33 GMT
640+
- Thu, 02 Apr 2026 07:54:34 GMT
641641
Pragma:
642642
- no-cache
643643
Strict-Transport-Security:
@@ -671,7 +671,7 @@ interactions:
671671
- application/json
672672
User-Agent:
673673
- linodego/dev https://github.com/linode/linodego
674-
url: https://api.linode.com/v4beta/nodebalancers/2092330
674+
url: https://api.linode.com/v4beta/nodebalancers/2095943
675675
method: DELETE
676676
response:
677677
body: '{}'
@@ -699,7 +699,7 @@ interactions:
699699
Content-Type:
700700
- application/json
701701
Expires:
702-
- Tue, 31 Mar 2026 12:47:34 GMT
702+
- Thu, 02 Apr 2026 07:54:35 GMT
703703
Pragma:
704704
- no-cache
705705
Strict-Transport-Security:
@@ -732,7 +732,7 @@ interactions:
732732
- application/json
733733
User-Agent:
734734
- linodego/dev https://github.com/linode/linodego
735-
url: https://api.linode.com/v4beta/vpcs/432829
735+
url: https://api.linode.com/v4beta/vpcs/435793
736736
method: DELETE
737737
response:
738738
body: '{}'
@@ -760,7 +760,7 @@ interactions:
760760
Content-Type:
761761
- application/json
762762
Expires:
763-
- Tue, 31 Mar 2026 12:47:34 GMT
763+
- Thu, 02 Apr 2026 07:54:36 GMT
764764
Pragma:
765765
- no-cache
766766
Strict-Transport-Security:

test/integration/fixtures/TestNodeBalancer_Create_WithFrontendAndBackendInDifferentVPCs.yaml

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ interactions:
378378
Content-Type:
379379
- application/json
380380
Expires:
381-
- Tue, 31 Mar 2026 12:49:34 GMT
381+
- Thu, 02 Apr 2026 07:56:02 GMT
382382
Pragma:
383383
- no-cache
384384
Strict-Transport-Security:
@@ -404,7 +404,7 @@ interactions:
404404
code: 200
405405
duration: ""
406406
- request:
407-
body: '{"label":"go-test-vpc-1774961374945956000","region":"nl-ams","ipv6":[{"range":"/52"}],"subnets":[{"label":"linodego-vpc-test-1774961374947038000","ipv4":"192.168.0.0/25","ipv6":[{"range":"/62"}]}]}'
407+
body: '{"label":"go-test-vpc-1775116562230247000","region":"nl-ams","ipv6":[{"range":"/52"}],"subnets":[{"label":"linodego-vpc-test-1775116562230403000","ipv4":"192.168.0.0/25","ipv6":[{"range":"/62"}]}]}'
408408
form: {}
409409
headers:
410410
Accept:
@@ -416,9 +416,9 @@ interactions:
416416
url: https://api.linode.com/v4beta/vpcs
417417
method: POST
418418
response:
419-
body: '{"id": 432830, "label": "go-test-vpc-1774961374945956000", "description":
419+
body: '{"id": 435794, "label": "go-test-vpc-1775116562230247000", "description":
420420
"", "region": "nl-ams", "ipv6": [{"range": "1234::5678/52"}], "subnets":
421-
[{"id": 541866, "label": "linodego-vpc-test-1774961374947038000", "ipv4": "192.168.0.0/25",
421+
[{"id": 547272, "label": "linodego-vpc-test-1775116562230403000", "ipv4": "192.168.0.0/25",
422422
"ipv6": [{"range": "1234::5678/62"}], "linodes": [], "databases": [],
423423
"nodebalancers": [], "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}],
424424
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}'
@@ -446,7 +446,7 @@ interactions:
446446
Content-Type:
447447
- application/json
448448
Expires:
449-
- Tue, 31 Mar 2026 12:49:37 GMT
449+
- Thu, 02 Apr 2026 07:56:04 GMT
450450
Pragma:
451451
- no-cache
452452
Strict-Transport-Security:
@@ -470,7 +470,7 @@ interactions:
470470
code: 200
471471
duration: ""
472472
- request:
473-
body: '{"label":"go-test-vpc-1774961377041808000","region":"nl-ams","ipv6":[{"range":"/52"}],"subnets":[{"label":"linodego-vpc-test-1774961377041995000","ipv4":"192.168.0.0/25","ipv6":[{"range":"/62"}]}]}'
473+
body: '{"label":"go-test-vpc-1775116564990459000","region":"nl-ams","ipv6":[{"range":"/52"}],"subnets":[{"label":"linodego-vpc-test-1775116564990621000","ipv4":"192.168.0.0/25","ipv6":[{"range":"/62"}]}]}'
474474
form: {}
475475
headers:
476476
Accept:
@@ -482,9 +482,9 @@ interactions:
482482
url: https://api.linode.com/v4beta/vpcs
483483
method: POST
484484
response:
485-
body: '{"id": 432831, "label": "go-test-vpc-1774961377041808000", "description":
485+
body: '{"id": 435795, "label": "go-test-vpc-1775116564990459000", "description":
486486
"", "region": "nl-ams", "ipv6": [{"range": "1234::5678/52"}], "subnets":
487-
[{"id": 541867, "label": "linodego-vpc-test-1774961377041995000", "ipv4": "192.168.0.0/25",
487+
[{"id": 547273, "label": "linodego-vpc-test-1775116564990621000", "ipv4": "192.168.0.0/25",
488488
"ipv6": [{"range": "1234::5678/62"}], "linodes": [], "databases": [],
489489
"nodebalancers": [], "created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}],
490490
"created": "2018-01-02T03:04:05", "updated": "2018-01-02T03:04:05"}'
@@ -512,7 +512,7 @@ interactions:
512512
Content-Type:
513513
- application/json
514514
Expires:
515-
- Tue, 31 Mar 2026 12:49:38 GMT
515+
- Thu, 02 Apr 2026 07:56:06 GMT
516516
Pragma:
517517
- no-cache
518518
Strict-Transport-Security:
@@ -536,7 +536,7 @@ interactions:
536536
code: 200
537537
duration: ""
538538
- request:
539-
body: '{"label":"go-test-def","region":"nl-ams","client_conn_throttle":20,"tags":null,"type":"premium","backend_vpcs":[{"subnet_id":541866}],"frontend_vpcs":[{"ipv4_range":"192.168.0.0/25","subnet_id":541867}]}'
539+
body: '{"label":"go-test-def","region":"nl-ams","client_conn_throttle":20,"tags":null,"type":"premium","backend_vpcs":[{"subnet_id":547272}],"frontend_vpcs":[{"ipv4_range":"192.168.0.0/25","subnet_id":547273}]}'
540540
form: {}
541541
headers:
542542
Accept:
@@ -548,9 +548,9 @@ interactions:
548548
url: https://api.linode.com/v4beta/nodebalancers
549549
method: POST
550550
response:
551-
body: '{"id": 2092332, "label": "go-test-def", "region": "nl-ams", "type": "premium",
551+
body: '{"id": 2095944, "label": "go-test-def", "region": "nl-ams", "type": "premium",
552552
"hostname": "", "ipv4": "192.168.0.2", "ipv6": "1234::5678", "frontend_address_type":
553-
"vpc", "frontend_vpc_subnet_id": 541867, "created": "2018-01-02T03:04:05", "updated":
553+
"vpc", "frontend_vpc_subnet_id": 547273, "created": "2018-01-02T03:04:05", "updated":
554554
"2018-01-02T03:04:05", "client_conn_throttle": 20, "client_udp_sess_throttle":
555555
0, "lke_cluster": null, "tags": [], "locks": [], "transfer": {"in": null, "out":
556556
null, "total": null}}'
@@ -578,7 +578,7 @@ interactions:
578578
Content-Type:
579579
- application/json
580580
Expires:
581-
- Tue, 31 Mar 2026 12:49:40 GMT
581+
- Thu, 02 Apr 2026 07:56:08 GMT
582582
Pragma:
583583
- no-cache
584584
Strict-Transport-Security:
@@ -611,13 +611,13 @@ interactions:
611611
- application/json
612612
User-Agent:
613613
- linodego/dev https://github.com/linode/linodego
614-
url: https://api.linode.com/v4beta/nodebalancers/2092332/vpcs?page=1
614+
url: https://api.linode.com/v4beta/nodebalancers/2095944/vpcs?page=1
615615
method: GET
616616
response:
617-
body: '{"data": [{"id": 48482, "nodebalancer_id": 2092332, "vpc_id": 432831, "subnet_id":
618-
541867, "ipv4_range": "192.168.0.2/32", "ipv6_range": "1234::5678/64",
619-
"purpose": "frontend"}, {"id": 48483, "nodebalancer_id": 2092332, "vpc_id":
620-
432830, "subnet_id": 541866, "ipv4_range": "192.168.0.4/30", "ipv6_range": "1234::5678/64",
617+
body: '{"data": [{"id": 49028, "nodebalancer_id": 2095944, "vpc_id": 435795, "subnet_id":
618+
547273, "ipv4_range": "192.168.0.2/32", "ipv6_range": "1234::5678/64",
619+
"purpose": "frontend"}, {"id": 49029, "nodebalancer_id": 2095944, "vpc_id":
620+
435794, "subnet_id": 547272, "ipv4_range": "192.168.0.4/30", "ipv6_range": "1234::5678/64",
621621
"purpose": "backend"}], "page": 1, "pages": 1, "results": 2}'
622622
headers:
623623
Access-Control-Allow-Credentials:
@@ -643,7 +643,7 @@ interactions:
643643
Content-Type:
644644
- application/json
645645
Expires:
646-
- Tue, 31 Mar 2026 12:49:41 GMT
646+
- Thu, 02 Apr 2026 07:56:09 GMT
647647
Pragma:
648648
- no-cache
649649
Strict-Transport-Security:
@@ -677,7 +677,7 @@ interactions:
677677
- application/json
678678
User-Agent:
679679
- linodego/dev https://github.com/linode/linodego
680-
url: https://api.linode.com/v4beta/nodebalancers/2092332
680+
url: https://api.linode.com/v4beta/nodebalancers/2095944
681681
method: DELETE
682682
response:
683683
body: '{}'
@@ -705,7 +705,7 @@ interactions:
705705
Content-Type:
706706
- application/json
707707
Expires:
708-
- Tue, 31 Mar 2026 12:49:43 GMT
708+
- Thu, 02 Apr 2026 07:56:12 GMT
709709
Pragma:
710710
- no-cache
711711
Strict-Transport-Security:
@@ -738,7 +738,7 @@ interactions:
738738
- application/json
739739
User-Agent:
740740
- linodego/dev https://github.com/linode/linodego
741-
url: https://api.linode.com/v4beta/vpcs/432830
741+
url: https://api.linode.com/v4beta/vpcs/435794
742742
method: DELETE
743743
response:
744744
body: '{}'
@@ -766,7 +766,7 @@ interactions:
766766
Content-Type:
767767
- application/json
768768
Expires:
769-
- Tue, 31 Mar 2026 12:49:43 GMT
769+
- Thu, 02 Apr 2026 07:56:13 GMT
770770
Pragma:
771771
- no-cache
772772
Strict-Transport-Security:
@@ -799,7 +799,7 @@ interactions:
799799
- application/json
800800
User-Agent:
801801
- linodego/dev https://github.com/linode/linodego
802-
url: https://api.linode.com/v4beta/vpcs/432831
802+
url: https://api.linode.com/v4beta/vpcs/435795
803803
method: DELETE
804804
response:
805805
body: '{}'
@@ -827,7 +827,7 @@ interactions:
827827
Content-Type:
828828
- application/json
829829
Expires:
830-
- Tue, 31 Mar 2026 12:49:44 GMT
830+
- Thu, 02 Apr 2026 07:56:13 GMT
831831
Pragma:
832832
- no-cache
833833
Strict-Transport-Security:

test/integration/nodebalancers_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ func setupNodeBalancerWithVPC(
510510
Region: vpc.Region,
511511
ClientConnThrottle: &clientConnThrottle,
512512
FirewallID: GetFirewallID(),
513-
BackendVPCs: []linodego.NodeBalancerVPCOptions{
513+
BackendVPCs: []linodego.NodeBalancerBackendVPCOptions{
514514
{
515515
IPv4Range: "192.168.0.64/30",
516516
IPv6Range: "",
@@ -598,7 +598,7 @@ func setupNodeBalancerWithPremiumTypeInDifferentVPCs(t *testing.T, fixturesYaml
598598
Region: region,
599599
ClientConnThrottle: &clientConnThrottle,
600600
Type: linodego.NBTypePremium,
601-
BackendVPCs: []linodego.NodeBalancerVPCOptions{
601+
BackendVPCs: []linodego.NodeBalancerBackendVPCOptions{
602602
{
603603
SubnetID: subnetBackend.ID,
604604
},

0 commit comments

Comments
 (0)