Skip to content

Commit

Permalink
addressing PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-akamai committed Nov 6, 2023
1 parent 71931e0 commit 5ff1b70
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/integration/cli/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def test_help_page_for_non_aliased_actions():
"API Documentation: https://www.linode.com/docs/api/linode-instances/#linodes-list"
in output
)
assert "wrong assertion" in output
assert "You may filter results with:" in output
assert "--tags" in output


Expand Down
16 changes: 8 additions & 8 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def create_nodebalancer_with_default_conf():

@pytest.fixture
def test_vpc_wo_subnet():
region = get_regions_with_vpcs_capabilties()[0]
region = get_regions_with_capabilities(["VPCs"])[0]

label = str(time.time_ns()) + "label"

Expand Down Expand Up @@ -408,7 +408,7 @@ def test_vpc_wo_subnet():

@pytest.fixture
def test_vpc_w_subnet():
region = get_regions_with_vpcs_capabilties()[0]
region = get_regions_with_capabilities(["VPCs"])[0]

vpc_label = str(time.time_ns()) + "label"

Expand Down Expand Up @@ -469,7 +469,7 @@ def test_subnet(test_vpc_wo_subnet):
yield res, subnet_label


def get_regions_with_vpcs_capabilties():
def get_regions_with_capabilities(capabilities):
regions = (
exec_test_command(
[
Expand All @@ -487,11 +487,11 @@ def get_regions_with_vpcs_capabilties():

regions = regions.split("\n")

regions_with_vpc = []
regions_with_all_caps = []

for region in regions:
if "VPCs" in region:
region_name = region.split()[0] # Extract the region name
regions_with_vpc.append(region_name)
region_name = region.split()[0]
if all(capability in region for capability in capabilities):
regions_with_all_caps.append(region_name)

return regions_with_vpc
return regions_with_all_caps
8 changes: 4 additions & 4 deletions tests/integration/vpc/test_vpc.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import re
import time

from tests.integration.conftest import get_regions_with_vpcs_capabilties
from tests.integration.conftest import get_regions_with_capabilities
from tests.integration.helpers import (
exec_failing_test_command,
exec_test_command,
Expand Down Expand Up @@ -157,7 +157,7 @@ def test_update_subnet(test_vpc_w_subnet):

def test_fails_to_create_vpc_invalid_label():
invalid_label = "invalid_label"
region = get_regions_with_vpcs_capabilties()[0]
region = get_regions_with_capabilities(["VPCs"])[0]

res = (
exec_failing_test_command(
Expand All @@ -181,7 +181,7 @@ def test_fails_to_create_vpc_duplicate_label(test_vpc_wo_subnet):
.stdout.decode()
.rstrip()
)
region = get_regions_with_vpcs_capabilties()[0]
region = get_regions_with_capabilities(["VPCs"])[0]

res = (
exec_failing_test_command(
Expand Down Expand Up @@ -213,7 +213,7 @@ def test_fails_to_update_vpc_invalid_label(test_vpc_wo_subnet):
def test_fails_to_create_vpc_subnet_w_invalid_label(test_vpc_wo_subnet):
vpc_id = test_vpc_wo_subnet
invalid_label = "invalid_label"
region = get_regions_with_vpcs_capabilties()[0]
region = get_regions_with_capabilities(["VPCs"])[0]

res = exec_failing_test_command(
BASE_CMD
Expand Down

0 comments on commit 5ff1b70

Please sign in to comment.