]> git.proxmox.com Git - pve-guest-common.git/commitdiff
tests: add checks for remove_from_pending_delete
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Oct 2019 17:45:58 +0000 (19:45 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 18 Oct 2019 17:45:58 +0000 (19:45 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
tests/abstract-config-tests.pl

index b0865c6b220ce1fc9c4914f067c84229227d4fa8..d807623fc7e3f1c70a34785397bec27456f2a57c 100755 (executable)
@@ -101,6 +101,26 @@ my $tests = [
        },
     ]
 },
+{
+    method => 'remove_from_pending_delete', # $conf, $key
+    subtests => [
+       { # simple test addition to of a pending deletion to the empty config
+           params => [ { pending => { delete => 'memory', } }, 'memory' ],
+           expect => { pending => {} },
+,
+       },
+       {
+           params => [ { pending => { delete => 'cpu,!memory', } }, 'memory' ],
+           expect => { pending => { delete => 'cpu' } },
+,
+       },
+       {
+           params => [ { pending => { delete => 'cpu', } }, 'memory' ],
+           expect => { pending => { delete => 'cpu' } },
+,
+       },
+    ]
+},
 ]; # tests definition end