[pve-devel] [PATCH v4 qemu-server 07/18] migration tests: mock $rpcenv->check subroutine

Oguz Bektas o.bektas at proxmox.com
Thu Jun 2 09:24:39 CEST 2022


missing mock routine is causes the tests to fail at build time
when $rpcenv->check is called.

previous assumption was returning 'root at pam' to get_user() so we can
do the same here.

Signed-off-by: Oguz Bektas <o.bektas at proxmox.com>
---
 test/MigrationTest/QmMock.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/test/MigrationTest/QmMock.pm b/test/MigrationTest/QmMock.pm
index 2d5d5c6..eb6ea53 100644
--- a/test/MigrationTest/QmMock.pm
+++ b/test/MigrationTest/QmMock.pm
@@ -40,6 +40,11 @@ sub fork_worker {
     return '123456';
 }
 
+sub check {
+    my ($self, $authuser, $path, $priv, $noerr) = @_;
+    return 1 if $authuser eq 'root at pam';
+}
+
 # mocked modules
 
 my $inotify_module = Test::MockModule->new("PVE::INotify");
-- 
2.30.2






More information about the pve-devel mailing list