diff --git a/lib/live_cluster/manage_controller.py b/lib/live_cluster/manage_controller.py index f9ac17ca..40178b6a 100644 --- a/lib/live_cluster/manage_controller.py +++ b/lib/live_cluster/manage_controller.py @@ -2485,7 +2485,7 @@ async def _do_default(self, line): line=line, arg="--no-warn", default=False, - modifiers=self.modifiers, + modifiers=self.modifiers | self.required_modifiers, mods=self.mods, ) diff --git a/test/e2e/live_cluster/test_manage.py b/test/e2e/live_cluster/test_manage.py index 13cb885c..051b07bb 100644 --- a/test/e2e/live_cluster/test_manage.py +++ b/test/e2e/live_cluster/test_manage.py @@ -1097,3 +1097,33 @@ def test_check_for_OK_response(self, cmd, exp_title, exp_header): for row in actual_values: entry = row[1] self.assertEqual(entry, ASINFO_RESPONSE_OK) + + +class ManageTruncateTest(TestManage): + def get_args(self, cmd): + return self._args.format(cmd) + + def setUp(self): + lib.start() + self._args = f"-h {lib.SERVER_IP}:{lib.PORT} --enable -e '{{}}' -Uadmin -Padmin" + + def tearDown(self) -> None: + lib.stop() + + @parameterized.expand( + [ + ( + f"manage truncate ns test --no-warn", + "Successfully started truncation for namespace test", + ), + ( + f"manage truncate ns test set testset --no-warn", + "Successfully started truncation for set testset of namespace test", + ), + ] + ) + def test_check_for_OK_response(self, cmd, exp_stdout): + cp = test_util.run_asadm(self.get_args(cmd)) + stdout = cp.stdout + + self.assertEqual(exp_stdout, stdout.strip())