mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-11-09 19:09:41 +00:00
Enable CAS for Add-ons (#3506)
* Revert "Disable CAS until it work (#3504)"
This reverts commit 435241bccf.
* Revert exception that are not forwarded
* enable for add-ons
* Apply suggestions from code review
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
* fix black
Co-authored-by: Mike Degatano <michael.degatano@gmail.com>
This commit is contained in:
@@ -46,7 +46,6 @@ def fixture_subprocess_exec(request):
|
||||
yield subprocess_exec
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
def test_checksum_calc():
|
||||
"""Calc Checkusm as test."""
|
||||
assert calc_checksum("test") == calc_checksum(b"test")
|
||||
@@ -56,7 +55,6 @@ def test_checksum_calc():
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
async def test_valid_checksum():
|
||||
"""Test a valid autorization."""
|
||||
await cas_validate(
|
||||
@@ -65,7 +63,6 @@ async def test_valid_checksum():
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
async def test_invalid_checksum():
|
||||
"""Test a invalid autorization."""
|
||||
with pytest.raises(CodeNotaryUntrusted):
|
||||
@@ -75,7 +72,6 @@ async def test_invalid_checksum():
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
@pytest.mark.parametrize(
|
||||
"subprocess_exec",
|
||||
[
|
||||
@@ -93,7 +89,6 @@ async def test_cas_backend_error(subprocess_exec):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
@pytest.mark.parametrize(
|
||||
"subprocess_exec",
|
||||
[SubprocessResponse(returncode=0, data='{"status":1}')],
|
||||
@@ -108,7 +103,6 @@ async def test_cas_notarized_untrusted(subprocess_exec):
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.skip()
|
||||
@pytest.mark.parametrize(
|
||||
"subprocess_exec", [SubprocessResponse(exception=OSError())], indirect=True
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user