[pve-devel] [PATCH storage 2/2] add 3 bwlimit tests

Stoiko Ivanov s.ivanov at proxmox.com
Fri Apr 5 16:33:35 CEST 2019


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 <s.ivanov at proxmox.com>
---
 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 at 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) {
-- 
2.11.0





More information about the pve-devel mailing list