]> git.proxmox.com Git - pve-manager.git/commitdiff
test: fix vzdump notification test
authorLukas Wagner <l.wagner@proxmox.com>
Tue, 14 Nov 2023 12:59:38 +0000 (13:59 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Fri, 17 Nov 2023 15:20:03 +0000 (16:20 +0100)
The signature of the PVE::Notify functions have changed, this commit
adapts the mocked functions so that the tests work again.

Signed-off-by: Lukas Wagner <l.wagner@proxmox.com>
test/vzdump_notification_test.pl

index 21c31651bb3784adcb7e1c25d75f0768474a3895..631606bbf21b0901b3de145293da3e02c7bd6856 100755 (executable)
@@ -38,14 +38,14 @@ my $result_properties;
 
 my $mock_notification_module = Test::MockModule->new('PVE::Notify');
 my $mocked_notify = sub {
-    my ($channel, $severity, $title, $text, $properties) = @_;
+    my ($severity, $title, $text, $properties, $metadata) = @_;
 
     $result_text = $text;
     $result_properties = $properties;
 };
 my $mocked_notify_short = sub {
-    my ($channel, @rest) = @_;
-    return $mocked_notify->($channel, '<some severity>', @rest);
+    my (@params) = @_;
+    return $mocked_notify->('<some severity>', @params);
 };
 
 $mock_notification_module->mock(