Let cifs-store appear as online to a call from
PVE::Storage::activate_storage.

Signed-off-by: Daniel Herzig <d.her...@proxmox.com>
---
 test/run_config2command_tests.pl | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/test/run_config2command_tests.pl b/test/run_config2command_tests.pl
index 3f37e881..a922086f 100755
--- a/test/run_config2command_tests.pl
+++ b/test/run_config2command_tests.pl
@@ -392,6 +392,25 @@ $pci_module->mock(
     }
 );
 
+my $pve_storage_plugin_module = Test::MockModule->new("PVE::Storage::Plugin");
+$pve_storage_plugin_module->mock(
+    activate_storage => sub {
+       return 1;
+    },
+);
+
+my $pve_storage_cifsplugin_module = 
Test::MockModule->new("PVE::Storage::CIFSPlugin");
+$pve_storage_cifsplugin_module->mock(
+    check_connection => sub {
+       return 1;
+    },
+    cifs_is_mounted => sub {
+       my ($scfg, $mountdata) = @_;
+       my ($mountpoint, $server, $share) = $scfg->@{'path', 'server', 'share'};
+       return $mountpoint;
+    },
+);
+
 sub diff($$) {
     my ($a, $b) = @_;
     return if $a eq $b;
-- 
2.39.5


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to