From ab06ad5f33e1321f7685bce05173942cef28ef68 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Wed, 19 Nov 2025 14:20:48 -0500 Subject: [PATCH 1/2] Fix integration test issues --- tests/integration/conftest.py | 4 ++-- .../integration/database/test_database_engine_config.py | 2 +- tests/integration/monitor/test_alerts.py | 2 +- tests/integration/vpc/conftest.py | 4 ++-- tests/integration/vpc/test_vpc.py | 9 +++++++++ 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index f79439942..253f1498e 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -215,8 +215,8 @@ def create_vpc_w_subnet(): vpc_label, "--region", region, - "--ipv6.range", - "auto", + # "--ipv6.range", TODO: Uncomment after VPC Dual Stack is ready to ship + # "auto", "--subnets.ipv4", "10.0.0.0/24", "--subnets.label", diff --git a/tests/integration/database/test_database_engine_config.py b/tests/integration/database/test_database_engine_config.py index 92fc6b7e5..55c7fa8a9 100644 --- a/tests/integration/database/test_database_engine_config.py +++ b/tests/integration/database/test_database_engine_config.py @@ -497,7 +497,7 @@ def test_mysql_engine_config_view(): binlog_retention = mysql_config[0]["binlog_retention_period"] assert binlog_retention["type"] == "integer" assert binlog_retention["minimum"] == 600 - assert binlog_retention["maximum"] == 604800 + assert binlog_retention["maximum"] == 9007199254740991 assert binlog_retention["requires_restart"] is False mysql_settings = mysql_config[0]["mysql"] diff --git a/tests/integration/monitor/test_alerts.py b/tests/integration/monitor/test_alerts.py index d844f698f..15ff6449f 100644 --- a/tests/integration/monitor/test_alerts.py +++ b/tests/integration/monitor/test_alerts.py @@ -104,7 +104,7 @@ def test_list_alert_definitions_for_service_type(get_service_type): output = exec_test_command( BASE_CMDS["alerts"] + [ - "service-definition-view", + "service-definitions-list", service_type, "--text", "--delimiter=,", diff --git a/tests/integration/vpc/conftest.py b/tests/integration/vpc/conftest.py index c5751cb9f..9b1abace0 100644 --- a/tests/integration/vpc/conftest.py +++ b/tests/integration/vpc/conftest.py @@ -34,8 +34,8 @@ def test_vpc_wo_subnet(): label, "--region", region, - "--ipv6.range", - "auto", + # "--ipv6.range", TODO: Uncomment after VPC Dual Stack is ready to ship + # "auto", "--no-headers", "--text", "--format=id", diff --git a/tests/integration/vpc/test_vpc.py b/tests/integration/vpc/test_vpc.py index 4d2300327..253d776a3 100644 --- a/tests/integration/vpc/test_vpc.py +++ b/tests/integration/vpc/test_vpc.py @@ -15,6 +15,10 @@ BASE_CMD = ["linode-cli", "vpcs"] +# TODO: Remove this variable and @pytest.mark.skipif once VPC Dual Stack is ready to ship +disable_vpc_dual_stack_tests = True + + def test_list_vpcs(test_vpc_wo_subnet): vpc_id = test_vpc_wo_subnet res = exec_test_command(BASE_CMDS["vpcs"] + ["ls", "--text"]) @@ -224,6 +228,7 @@ def test_fails_to_update_vpc_subenet_w_invalid_label(test_vpc_w_subnet): assert "Label must include only ASCII" in res +@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") def test_create_vpc_with_ipv6_auto(): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + "-vpc" @@ -254,6 +259,7 @@ def test_create_vpc_with_ipv6_auto(): @pytest.mark.parametrize("prefix_len", ["52"]) +@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") def test_create_vpc_with_custom_ipv6_prefix_length(prefix_len): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + f"-vpc{prefix_len}" @@ -281,6 +287,7 @@ def test_create_vpc_with_custom_ipv6_prefix_length(prefix_len): assert ipv6_range.endswith(f"/{prefix_len}") +@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") def test_create_subnet_with_ipv6_auto(test_vpc_wo_subnet): vpc_id = test_vpc_wo_subnet subnet_label = get_random_text(5) + "-ipv6subnet" @@ -317,6 +324,7 @@ def test_create_subnet_with_ipv6_auto(test_vpc_wo_subnet): assert "/" in ipv6_range, f"Unexpected IPv6 CIDR format: {ipv6_range}" +@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") def test_fails_to_create_vpc_with_invalid_ipv6_range(): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + "-invalidvpc" @@ -352,6 +360,7 @@ def test_list_vpc_ip_address(): assert header in lines[0] +@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") def test_list_vpc_ipv6s_address(): res = exec_test_command( From 908a66d30c8f1ab22d0e79851420d83ca1432539 Mon Sep 17 00:00:00 2001 From: ezilber-akamai Date: Wed, 19 Nov 2025 14:25:13 -0500 Subject: [PATCH 2/2] Fix lint --- tests/integration/vpc/test_vpc.py | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/tests/integration/vpc/test_vpc.py b/tests/integration/vpc/test_vpc.py index 253d776a3..0117374db 100644 --- a/tests/integration/vpc/test_vpc.py +++ b/tests/integration/vpc/test_vpc.py @@ -228,7 +228,9 @@ def test_fails_to_update_vpc_subenet_w_invalid_label(test_vpc_w_subnet): assert "Label must include only ASCII" in res -@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") +@pytest.mark.skipif( + disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled" +) def test_create_vpc_with_ipv6_auto(): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + "-vpc" @@ -259,7 +261,9 @@ def test_create_vpc_with_ipv6_auto(): @pytest.mark.parametrize("prefix_len", ["52"]) -@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") +@pytest.mark.skipif( + disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled" +) def test_create_vpc_with_custom_ipv6_prefix_length(prefix_len): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + f"-vpc{prefix_len}" @@ -287,7 +291,9 @@ def test_create_vpc_with_custom_ipv6_prefix_length(prefix_len): assert ipv6_range.endswith(f"/{prefix_len}") -@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") +@pytest.mark.skipif( + disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled" +) def test_create_subnet_with_ipv6_auto(test_vpc_wo_subnet): vpc_id = test_vpc_wo_subnet subnet_label = get_random_text(5) + "-ipv6subnet" @@ -324,7 +330,9 @@ def test_create_subnet_with_ipv6_auto(test_vpc_wo_subnet): assert "/" in ipv6_range, f"Unexpected IPv6 CIDR format: {ipv6_range}" -@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") +@pytest.mark.skipif( + disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled" +) def test_fails_to_create_vpc_with_invalid_ipv6_range(): region = get_random_region_with_caps(required_capabilities=["VPCs"]) label = get_random_text(5) + "-invalidvpc" @@ -360,7 +368,9 @@ def test_list_vpc_ip_address(): assert header in lines[0] -@pytest.mark.skipif(disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled") +@pytest.mark.skipif( + disable_vpc_dual_stack_tests, reason="Dual-stack tests disabled" +) def test_list_vpc_ipv6s_address(): res = exec_test_command(