chore: 移除不存在的 etcdutl 命令及其相关逻辑和测试

This commit is contained in:
Your Name
2026-07-25 14:23:04 +08:00
parent 4b54e49a0d
commit a5399bd69d
2 changed files with 3 additions and 27 deletions
+2 -7
View File
@@ -127,8 +127,8 @@ class EtcdCommandPolicyTest(unittest.TestCase):
self.assertEqual(decision.mode, "read")
self.assertFalse(decision.requires_approval)
def test_etcdutl_snapshot_status_is_read_only(self):
decision = classify_shell_command("etcdutl snapshot status /tmp/etcd.db")
def test_etcdctl_alarm_list_is_read_only(self):
decision = classify_shell_command("etcdctl alarm list")
self.assertEqual(decision.mode, "read")
self.assertFalse(decision.requires_approval)
@@ -157,11 +157,6 @@ class EtcdCommandPolicyTest(unittest.TestCase):
self.assertEqual(decision.mode, "write")
self.assertTrue(decision.requires_approval)
def test_etcdutl_snapshot_restore_requires_approval(self):
decision = classify_shell_command("etcdutl snapshot restore /tmp/etcd.db")
self.assertEqual(decision.mode, "write")
self.assertTrue(decision.requires_approval)
def test_etcdctl_rejects_unknown_subcommand(self):
with self.assertRaises(ValueError):
classify_shell_command("etcdctl bogus command")