From e71336ad8883379c721592a88ac7905264df9ceb Mon Sep 17 00:00:00 2001 From: Stoiko Ivanov Date: Fri, 5 Apr 2019 16:33:35 +0200 Subject: [PATCH] add 3 bwlimit tests 1) checking that the empty storage list is treated correctly (only override and datacenter config limit considered) 2) checking that the empty storage list is treated correctly (as with 1). 3) checking that undef can be passed as one element of the storage list (it is ignored) Signed-off-by: Stoiko Ivanov --- test/run_bwlimit_tests.pl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/run_bwlimit_tests.pl b/test/run_bwlimit_tests.pl index a835dc9..8488637 100755 --- a/test/run_bwlimit_tests.pl +++ b/test/run_bwlimit_tests.pl @@ -107,6 +107,8 @@ my @tests = ( [ ['unknown', ['d50m40r30'], 0], 0, 'root / storage default limit' ], [ ['move', ['d50m40r30'], 0], 0, 'root / specific storage limit (move)' ], [ ['restore', ['d50m40r30'], 0], 0, 'root / specific storage limit (restore)' ], + [ ['migrate', undef, 100], 100, 'root / undef storage (migrate)' ], + [ ['migrate', [], 100], 100, 'root / no storage (migrate)' ], [ user => 'user1@test' ], [ ['unknown', ['nolimit'], undef], 100, 'generic default limit' ], @@ -186,6 +188,7 @@ my @tests = ( [ ['move', ['nolimit', 'd20m40r30'], undef], 40, 'multiple storages specific limit with privileges on one of them (default limited) (move)' ], [ ['restore', ['nolimit', 'd20m40r30'], undef], 30, 'multiple storages specific limit with privileges on one of them (default limited) (restore)' ], [ ['restore', ['d20m40r30', 'm50'], 200], 60, 'multiple storages specific limit with privileges on one of them (global default limited) (restore)' ], + [ ['move', ['nolimit', undef ], 40] , 40, 'multiple storages one undefined, passing 100 (move)' ], ); foreach my $t (@tests) {