Skip to content

Commit

Permalink
Adjust tests for extra policy dir change in qrexec
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Sep 26, 2024
1 parent caf0dae commit 5f94bb1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions qubes/tests/api_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def test_002_vm_list_filter(self):
with tempfile.TemporaryDirectory() as tmpdir:
tmpdir = pathlib.Path(tmpdir)
with unittest.mock.patch(
'qubes.ext.admin.AdminExtension._instance.policy_cache.path',
pathlib.Path(tmpdir)):
'qubes.ext.admin.AdminExtension._instance.policy_cache.paths',
[pathlib.Path(tmpdir)]):
with (tmpdir / 'admin.policy').open('w') as f:
f.write('admin.vm.List * @anyvm @adminvm allow\n')
f.write('admin.vm.List * @anyvm test-vm1 allow')
Expand Down Expand Up @@ -1243,8 +1243,8 @@ def test_272_events_filter(self):
with tempfile.TemporaryDirectory() as tmpdir:
tmpdir = pathlib.Path(tmpdir)
with unittest.mock.patch(
'qubes.ext.admin.AdminExtension._instance.policy_cache.path',
pathlib.Path(tmpdir)):
'qubes.ext.admin.AdminExtension._instance.policy_cache.paths',
[pathlib.Path(tmpdir)]):
with (tmpdir / 'admin.policy').open('w') as f:
f.write('admin.Events * @anyvm @adminvm allow\n')
f.write('admin.Events * @anyvm test-vm1 allow')
Expand Down

0 comments on commit 5f94bb1

Please sign in to comment.