tests: zones: output any unexpected error as diagnostic

really helps debugging things..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2023-11-29 11:27:13 +01:00
parent af7e542ad7
commit 677e12cacf

View file

@ -97,6 +97,7 @@ foreach my $test (@tests) {
};
if (my $err = $@) {
diag("got unexpected error - $err");
fail($name);
} else {
is ($result, $expected, $name);
@ -111,6 +112,7 @@ foreach my $test (@tests) {
$controller_rawconfig = PVE::Network::SDN::Controllers::generate_controller_rawconfig($config);
};
if (my $err = $@) {
diag("got unexpected error - $err");
fail($name);
} else {
is ($controller_rawconfig, $expected, $name);