Signed-off-by: Christoph Heiss <[email protected]>
---
test/validate-link-pin-map.pl | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/test/validate-link-pin-map.pl b/test/validate-link-pin-map.pl
index 37e8387..3a95aab 100755
--- a/test/validate-link-pin-map.pl
+++ b/test/validate-link-pin-map.pl
@@ -25,17 +25,21 @@ eval { validate_link_pin_map({ 'ab:cd:ef:12:34:56' =>
'waytoolonginterfacename'
is(
$@,
"interface name 'waytoolonginterfacename' for 'ab:cd:ef:12:34:56' cannot
be longer than 15 characters\n",
+ "too long name is rejected",
);
eval { validate_link_pin_map({ 'ab:cd:ef:12:34:56' => 'nic0',
'12:34:56:ab:cd:ef' => 'nic0' }) };
-like($@, qr/^duplicate interface name mapping 'nic0' for: /);
-like($@, qr/ab:cd:ef:12:34:56/);
-like($@, qr/12:34:56:ab:cd:ef/);
+like(
+ $@, qr/^duplicate interface name mapping 'nic0' for: /, "duplicate
assignment is rejected",
+);
+like($@, qr/ab:cd:ef:12:34:56/, "duplicate error message contains expected mac
address");
+like($@, qr/12:34:56:ab:cd:ef/, "duplicate error message contains expected mac
address");
eval { validate_link_pin_map({ 'ab:cd:ef:12:34:56' => 'nic-' }) };
is(
$@,
"interface name 'nic-' for 'ab:cd:ef:12:34:56' is invalid: name must only
consist of alphanumeric characters and underscores\n",
+ "name with dash is rejected",
);
eval { validate_link_pin_map({ 'ab:cd:ef:12:34:56' => '0nic' }) };
@@ -56,6 +60,7 @@ eval { validate_link_pin_map({ 'ab:cd:ef:12:34:56' => '12345'
}) };
is(
$@,
"interface name '12345' for 'ab:cd:ef:12:34:56' is invalid: name must not
be fully numeric\n",
+ "fully numeric name is rejected",
);
done_testing();
--
2.51.0
_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel