]> git.proxmox.com Git - pve-storage.git/commitdiff
add 3 bwlimit tests
authorStoiko Ivanov <s.ivanov@proxmox.com>
Fri, 5 Apr 2019 14:33:35 +0000 (16:33 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 5 Apr 2019 16:15:01 +0000 (18:15 +0200)
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@proxmox.com>
test/run_bwlimit_tests.pl

index a835dc91019537b4fa8ec24efe200f7feb80d715..84886372715c95ecb8a5c1c687d010064ea9261f 100755 (executable)
@@ -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) {