Add UnsupportedEncryptionError for unsupported encryption schemes (#1866)
Some checks failed
CI / Perform Lint Checks (3.15) (push) Has been cancelled
CI / Python 3.11 on macos-latest (push) Has been cancelled
CI / Python 3.12 on macos-latest (push) Has been cancelled
CI / Python 3.13 on macos-latest (push) Has been cancelled
CI / Python 3.14 on macos-latest (push) Has been cancelled
CI / Python 3.15 on macos-latest (push) Has been cancelled
CI / Python 3.11 on ubuntu-latest (push) Has been cancelled
CI / Python 3.12 on ubuntu-latest (push) Has been cancelled
CI / Python 3.13 on ubuntu-latest (push) Has been cancelled
CI / Python 3.14 on ubuntu-latest (push) Has been cancelled
CI / Python 3.15 on ubuntu-latest (push) Has been cancelled
CI / Python 3.11 on windows-latest (push) Has been cancelled
CI / Python 3.12 on windows-latest (push) Has been cancelled
CI / Python 3.13 on windows-latest (push) Has been cancelled
CI / Python 3.14 on windows-latest (push) Has been cancelled
CI / Python 3.15 on windows-latest (push) Has been cancelled
CodeQL Checks / Analyze (python) (push) Has been cancelled

This commit is contained in:
Teemu R.
2026-11-28 01:13:53 +01:00
committed by GitHub
parent 422194e5eb
commit 6a35bb6e53
8 changed files with 53 additions and 13 deletions

View File

@@ -209,10 +209,17 @@ async def test_list_update_failed(
assert row in res.output.replace("\n", "")
# Unsupported device fixtures failing on their encryption, by fixture id
UNSUPPORTED_ENCRYPTION_ROWS = {
"unknown_encryption": "ENCRYPTION FOO",
"wrong_encryption_smart": "ENCRYPTION IOT",
}
async def test_list_unsupported(
unsupported_device_info: dict, runner: CliRunner
unsupported_device_info: dict, runner: CliRunner, request: pytest.FixtureRequest
) -> None:
"""Test that device update is called on main."""
"""Test that unsupported devices are listed with the reason, if known."""
res = await runner.invoke(
cli,
["--username", "foo", "--password", "bar", "discover", "list"],
@@ -223,7 +230,8 @@ async def test_list_unsupported(
f"{'HOST':<15} {'MODEL':<9} {'DEVICE FAMILY':<20} {'ENCRYPT':<7} "
f"{'HTTPS':<5} {'LV':<3} {'ALIAS'}"
)
row = f"{'127.0.0.1':<15} UNSUPPORTED DEVICE"
reason = UNSUPPORTED_ENCRYPTION_ROWS.get(request.node.callspec.id, "DEVICE")
row = f"{'127.0.0.1':<15} UNSUPPORTED {reason}\n"
assert header in res.output
assert row in res.output