Skip to content

Commit b4e221f

Browse files
authored
test: Add skip for backup test for managed test accounts (#614)
1 parent 121f05c commit b4e221f

File tree

2 files changed

+23
-1
lines changed

2 files changed

+23
-1
lines changed

tests/integration/cli/test_host_overrides.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,10 @@ def test_cli_command_fails_to_access_invalid_host(monkeypatch: MonkeyPatch):
1111
process = exec_failing_test_command(["linode-cli", "linodes", "ls"])
1212
output = process.stderr.decode()
1313

14-
assert "Max retries exceeded with url: //wrongapi.linode.com" in output
14+
expected_output = ["Max retries exceeded with url:", "wrongapi.linode.com"]
15+
16+
for eo in expected_output:
17+
assert eo in output
1518

1619

1720
def test_cli_uses_v4beta_when_override_is_set(monkeypatch: MonkeyPatch):

tests/integration/linodes/test_backups.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,25 @@ def create_linode_backup_disabled_setup():
4444
delete_target_id("linodes", linode_id)
4545

4646

47+
def check_account_settings():
48+
result = exec_test_command(
49+
[
50+
"linode-cli",
51+
"account",
52+
"settings",
53+
"--text",
54+
"--format",
55+
"managed",
56+
"--no-headers",
57+
]
58+
).stdout.decode()
59+
60+
return result
61+
62+
63+
@pytest.mark.skipif(
64+
check_account_settings(), reason="Account is managed, skipping the test.."
65+
)
4766
def test_create_linode_with_backup_disabled(
4867
create_linode_backup_disabled_setup,
4968
):

0 commit comments

Comments
 (0)