mirror of
https://github.com/home-assistant/supervisor.git
synced 2025-07-14 12:46:32 +00:00
Disable CAS until it work (#3504)
* Disable CAS until it work * fix tests
This commit is contained in:
parent
1b8558ced3
commit
435241bccf
1
.github/workflows/builder.yml
vendored
1
.github/workflows/builder.yml
vendored
@ -287,6 +287,7 @@ jobs:
|
|||||||
- name: Check the Supervisor code sign
|
- name: Check the Supervisor code sign
|
||||||
if: needs.init.outputs.publish == 'true'
|
if: needs.init.outputs.publish == 'true'
|
||||||
run: |
|
run: |
|
||||||
|
exit 0
|
||||||
echo "Enable Content-Trust"
|
echo "Enable Content-Trust"
|
||||||
test=$(docker exec hassio_cli ha security options --content-trust=true --no-progress --raw-json | jq -r '.result')
|
test=$(docker exec hassio_cli ha security options --content-trust=true --no-progress --raw-json | jq -r '.result')
|
||||||
if [ "$test" != "ok" ]; then
|
if [ "$test" != "ok" ]; then
|
||||||
|
@ -44,6 +44,8 @@ async def cas_validate(
|
|||||||
checksum: str,
|
checksum: str,
|
||||||
) -> None:
|
) -> None:
|
||||||
"""Validate data against CodeNotary."""
|
"""Validate data against CodeNotary."""
|
||||||
|
return
|
||||||
|
# pylint: disable=unreachable
|
||||||
if (checksum, signer) in _CACHE:
|
if (checksum, signer) in _CACHE:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
@ -7,6 +7,7 @@ from supervisor.coresys import CoreSys
|
|||||||
from supervisor.exceptions import CodeNotaryError
|
from supervisor.exceptions import CodeNotaryError
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
async def test_content_trust(coresys: CoreSys):
|
async def test_content_trust(coresys: CoreSys):
|
||||||
"""Test Content-Trust."""
|
"""Test Content-Trust."""
|
||||||
|
|
||||||
@ -23,6 +24,7 @@ async def test_content_trust(coresys: CoreSys):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
async def test_disabled_content_trust(coresys: CoreSys):
|
async def test_disabled_content_trust(coresys: CoreSys):
|
||||||
"""Test Content-Trust."""
|
"""Test Content-Trust."""
|
||||||
coresys.security.content_trust = False
|
coresys.security.content_trust = False
|
||||||
@ -36,6 +38,7 @@ async def test_disabled_content_trust(coresys: CoreSys):
|
|||||||
assert not cas_validate.called
|
assert not cas_validate.called
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
async def test_force_content_trust(coresys: CoreSys):
|
async def test_force_content_trust(coresys: CoreSys):
|
||||||
"""Force Content-Trust tests."""
|
"""Force Content-Trust tests."""
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ def fixture_subprocess_exec(request):
|
|||||||
yield subprocess_exec
|
yield subprocess_exec
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
def test_checksum_calc():
|
def test_checksum_calc():
|
||||||
"""Calc Checkusm as test."""
|
"""Calc Checkusm as test."""
|
||||||
assert calc_checksum("test") == calc_checksum(b"test")
|
assert calc_checksum("test") == calc_checksum(b"test")
|
||||||
@ -55,6 +56,7 @@ def test_checksum_calc():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
async def test_valid_checksum():
|
async def test_valid_checksum():
|
||||||
"""Test a valid autorization."""
|
"""Test a valid autorization."""
|
||||||
await cas_validate(
|
await cas_validate(
|
||||||
@ -63,6 +65,7 @@ async def test_valid_checksum():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
async def test_invalid_checksum():
|
async def test_invalid_checksum():
|
||||||
"""Test a invalid autorization."""
|
"""Test a invalid autorization."""
|
||||||
with pytest.raises(CodeNotaryUntrusted):
|
with pytest.raises(CodeNotaryUntrusted):
|
||||||
@ -72,6 +75,7 @@ async def test_invalid_checksum():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"subprocess_exec",
|
"subprocess_exec",
|
||||||
[
|
[
|
||||||
@ -89,6 +93,7 @@ async def test_cas_backend_error(subprocess_exec):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"subprocess_exec",
|
"subprocess_exec",
|
||||||
[SubprocessResponse(returncode=0, data='{"status":1}')],
|
[SubprocessResponse(returncode=0, data='{"status":1}')],
|
||||||
@ -103,6 +108,7 @@ async def test_cas_notarized_untrusted(subprocess_exec):
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skip()
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
"subprocess_exec", [SubprocessResponse(exception=OSError())], indirect=True
|
"subprocess_exec", [SubprocessResponse(exception=OSError())], indirect=True
|
||||||
)
|
)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user