fix(oci): gate stack recreate by replay support

This commit is contained in:
VAIO73
2026-10-06 18:22:42 +02:00
parent 0cf62149fd
commit cff386053b
2 changed files with 3 additions and 2 deletions
@@ -69,7 +69,7 @@ class SelectionSetupWording(TestCase):
# It cannot be updated, but it can still be changed or removed.
ui = self._stack({'members': [{'native_stack_intent': {'adapt': True}}]}, REPLAY)
ui.choose.assert_called_once()
self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['recreate', 'remove'])
self.assertEqual([tag for tag, _ in ui.choose.call_args.args[1]], ['modify', 'remove'])
def _stack(self, stack, expected):
record = {'stack': stack}
+2 -1
View File
@@ -484,7 +484,8 @@ def _manage_stack(project, ui, row, action=None, lifecycle_args=()):
# A stack that cannot be updated can still be removed.
options = [('update', translate('Update every container of the application'))] if updatable else []
options.append(('modify', translate('Modify extra paths and devices')))
options.append(('recreate', translate('Recreate every container with its saved configuration')))
if updatable:
options.append(('recreate', translate('Recreate every container with its saved configuration')))
options.append(('remove', translate('Remove: delete the application and its containers')))
action = ui.choose(translate('Manage OCI stack'), options, options[0][0])
if action is None: