mirror of
https://github.com/MacRimi/ProxMenux.git
synced 2026-11-01 10:22:08 +00:00
fix(oci): count only paths added by hand in the Modify menu
- Leave the application's own volumes out of the Extra paths count - Add a regression test for the count
This commit is contained in:
@@ -147,6 +147,13 @@ class ModifyMenuTests(unittest.TestCase):
|
||||
recreation.edit_recreation(record(), ui)
|
||||
self.assertNotIn('private-test-secret', json.dumps(ui.events))
|
||||
|
||||
def test_extra_paths_counts_only_paths_added_by_hand(self, _language):
|
||||
candidate = record()
|
||||
self.assertTrue(dict(recreation.modification_options(candidate))['paths'].rstrip().endswith(' 0'))
|
||||
candidate['deployment']['mounts'].append({'container_path': '/media-extra', 'type': 'host-bind',
|
||||
'source': '/mnt/media', 'custom': True})
|
||||
self.assertTrue(dict(recreation.modification_options(candidate))['paths'].rstrip().endswith(' 1'))
|
||||
|
||||
def test_optional_categories_follow_the_application_profile(self, _language):
|
||||
candidate = record()
|
||||
options = dict(recreation.modification_options(candidate))
|
||||
|
||||
Reference in New Issue
Block a user