From a7030d221f720cb36e4cbcdbafda083df341f0a9 Mon Sep 17 00:00:00 2001 From: "bodong.yang" Date: Wed, 23 Oct 2024 06:43:09 +0000 Subject: [PATCH] fix up test_ota_client --- tests/test_otaclient/test_ota_client.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/test_otaclient/test_ota_client.py b/tests/test_otaclient/test_ota_client.py index f464d8b96..4cebecb8d 100644 --- a/tests/test_otaclient/test_ota_client.py +++ b/tests/test_otaclient/test_ota_client.py @@ -48,6 +48,18 @@ from tests.utils import SlotMeta +@pytest.fixture(autouse=True, scope="module") +def mock_certs_dir(module_mocker: pytest_mock.MockerFixture): + """Mock to use the certs from the OTA test base image.""" + from otaclient.app.ota_client import cfg as _cfg + + module_mocker.patch.object( + _cfg, + "CERTS_DIR", + cfg.CERTS_DIR, + ) + + class TestOTAUpdater: """ NOTE: the boot_control and create_standby are mocked, only testing