Skip to content

Commit

Permalink
test: Add skip for backup test for managed test accounts (linode#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
ykim-akamai authored May 22, 2024
1 parent 121f05c commit b4e221f
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/integration/cli/test_host_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ def test_cli_command_fails_to_access_invalid_host(monkeypatch: MonkeyPatch):
process = exec_failing_test_command(["linode-cli", "linodes", "ls"])
output = process.stderr.decode()

assert "Max retries exceeded with url: //wrongapi.linode.com" in output
expected_output = ["Max retries exceeded with url:", "wrongapi.linode.com"]

for eo in expected_output:
assert eo in output


def test_cli_uses_v4beta_when_override_is_set(monkeypatch: MonkeyPatch):
Expand Down
19 changes: 19 additions & 0 deletions tests/integration/linodes/test_backups.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,25 @@ def create_linode_backup_disabled_setup():
delete_target_id("linodes", linode_id)


def check_account_settings():
result = exec_test_command(
[
"linode-cli",
"account",
"settings",
"--text",
"--format",
"managed",
"--no-headers",
]
).stdout.decode()

return result


@pytest.mark.skipif(
check_account_settings(), reason="Account is managed, skipping the test.."
)
def test_create_linode_with_backup_disabled(
create_linode_backup_disabled_setup,
):
Expand Down

0 comments on commit b4e221f

Please sign in to comment.