[pve-devel] [PATCH manager 3/3] test: replication: remove mocking for obsolete volume_snapshot_list

Fabian Ebner f.ebner at proxmox.com
Tue Oct 19 09:54:59 CEST 2021


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---

Build-depends on pve-guest-common already using volume_snapshot_info.

 test/ReplicationTestEnv.pm | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/test/ReplicationTestEnv.pm b/test/ReplicationTestEnv.pm
index 35653e75..883bebca 100755
--- a/test/ReplicationTestEnv.pm
+++ b/test/ReplicationTestEnv.pm
@@ -177,19 +177,6 @@ sub register_mocked_volid {
     $d->{$snapname} = generate_snapshot_info() if $snapname;
 }
 
-my $mocked_volume_snapshot_list = sub {
-    my ($cfg, $volid, $prefix) = @_;
-
-    my ($storeid, $volname) = PVE::Storage::parse_volume_id($volid);
-    my $snaps = [];
-
-    if (my $d = $mocked_storage_content->{$storeid}->{$volname}) {
-	$snaps = [keys %$d];
-    }
-
-    return $snaps;
-};
-
 my $mocked_volume_snapshot = sub {
     my ($cfg, $volid, $snap) = @_;
 
@@ -269,7 +256,6 @@ sub setup {
     $pve_replication_module->mock(get_log_time => $mocked_get_log_time);
 
     $pve_storage_module->mock(config => sub { return $mocked_storage_config; });
-    $pve_storage_module->mock(volume_snapshot_list => $mocked_volume_snapshot_list);
     $pve_storage_module->mock(volume_snapshot => $mocked_volume_snapshot);
     $pve_storage_module->mock(volume_snapshot_delete => $mocked_volume_snapshot_delete);
     $pve_storage_module->mock(volume_snapshot_info => $mocked_volume_snapshot_info);
-- 
2.30.2





More information about the pve-devel mailing list