Skip to content

Commit 0db2723

Browse files
committed
Add vpcs-list and vpc-view checks in test_nb_with_frontend_ipv4_only
1 parent 40c36b6 commit 0db2723

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

tests/integration/nodebalancers/test_node_balancers.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,32 @@ def test_nb_with_frontend_ipv4_only(get_vpc_with_subnet):
672672
assert nb_attrs[0]["frontend_address_type"] == "vpc"
673673
assert nb_attrs[0]["frontend_vpc_subnet_id"] == vpc["subnets"][0]["id"]
674674

675+
nb_vpcs = json.loads(
676+
exec_test_command(
677+
BASE_CMDS["nodebalancers"]
678+
+ [
679+
"vpcs-list",
680+
nb_id,
681+
"--json",
682+
]
683+
),
684+
)
685+
assert len(nb_vpcs) == 1
686+
assert nb_vpcs[0]["purpose"] == "frontend"
687+
688+
nb_vpc = json.loads(
689+
exec_test_command(
690+
BASE_CMDS["nodebalancers"]
691+
+ [
692+
"vpc-view",
693+
nb_id,
694+
str(nb_vpcs[0]["id"]),
695+
"--json",
696+
]
697+
),
698+
)
699+
assert nb_vpc[0]["purpose"] == "frontend"
700+
675701
# TODO: Uncomment when API implementation of /backend_vpcs and /frontend_vpcs endpoints is finished
676702
# nb_frontend_vpcs = json.loads(
677703
# exec_test_command(

0 commit comments

Comments
 (0)