Skip to content

Commit

Permalink
update test_cfg_consts accordingly
Browse files Browse the repository at this point in the history
  • Loading branch information
Bodong-Yang committed Oct 11, 2024
1 parent 1cf975c commit 203c5d7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/test_otaclient/test_configs/test_cfg_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,14 @@

from pytest_mock import MockerFixture

from otaclient.configs import Consts
from otaclient.configs import Consts, dynamic_root


def test_cfg_consts_dynamic_root(mocker: MockerFixture):
_real_root = "/host_root"
mocked_consts = Consts()

mocker.patch.object(mocked_consts, "_ACTIVE_ROOT", _real_root)

assert mocked_consts.ACTIVE_ROOT == _real_root
assert mocked_consts.RUN_DIR == "/run/otaclient"
assert mocked_consts.BOOT_DPATH == "/host_root/boot"
assert dynamic_root(mocked_consts.BOOT_DPATH) == "/host_root/boot"
assert mocked_consts.OTA_API_SERVER_PORT == 50051

0 comments on commit 203c5d7

Please sign in to comment.