From e33cb61565b30333616c8838c6b0c373e89c9069 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Fri, 18 Oct 2019 19:45:58 +0200 Subject: [PATCH] tests: add checks for remove_from_pending_delete Signed-off-by: Thomas Lamprecht --- tests/abstract-config-tests.pl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tests/abstract-config-tests.pl b/tests/abstract-config-tests.pl index b0865c6..d807623 100755 --- a/tests/abstract-config-tests.pl +++ b/tests/abstract-config-tests.pl @@ -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