Get rid of ' characters in errors

This commit is contained in:
Pim van Pelt
2022-03-15 21:13:42 +00:00
parent 2bbcff2ca0
commit 2947bbfd25
5 changed files with 6 additions and 6 deletions

View File

@ -2,7 +2,7 @@ test:
description: "Members of a BondEthernet must exist"
errors:
expected:
- "bondethernet .* member .* doesn't exist"
- "bondethernet .* member .* does not exist"
count: 2
---
bondethernets:

View File

@ -2,7 +2,7 @@ test:
description: "Interfaces put into the bridge, must exist as phy or sub-interface"
errors:
expected:
- "bridgedomain .* member .* doesn't exist"
- "bridgedomain .* member .* does not exist"
count: 2
---
interfaces:

View File

@ -42,7 +42,7 @@ def validate_bondethernets(yaml):
logger.debug("bondethernet %s: %s" % (ifname, iface))
for member in iface['interfaces']:
if not interface.get_by_name(yaml, member):
msgs.append("bondethernet %s member %s doesn't exist" % (ifname, member))
msgs.append("bondethernet %s member %s does not exist" % (ifname, member))
result = False
if interface.has_sub(yaml, member):

View File

@ -62,7 +62,7 @@ def validate_bridgedomains(yaml):
for member in iface['interfaces']:
member_iface = interface.get_by_name(yaml, member)
if not member_iface:
msgs.append("bridgedomain %s member %s doesn't exist" % (ifname, member))
msgs.append("bridgedomain %s member %s does not exist" % (ifname, member))
result = False
continue

View File

@ -418,7 +418,7 @@ def validate_interfaces(yaml):
sub_lcp = get_lcp(yaml, sub_ifname)
if sub_lcp and len(sub_lcp)>15:
msgs.append("sub-interface %s has LCP with too long name '%s'" % (sub_ifname, sub_lcp))
msgs.append("sub-interface %s has LCP with too long name %s" % (sub_ifname, sub_lcp))
result = False
if iface_lcp and not lcp.is_unique(yaml, iface_lcp):
msgs.append("sub-interface %s does not have a unique LCP name %s" % (sub_ifname, sub_lcp))
@ -444,7 +444,7 @@ def validate_interfaces(yaml):
msgs.append("sub-interface %s has invalid encapsulation" % (sub_ifname))
result = False
elif not unique_encapsulation(yaml, sub_ifname):
msgs.append("sub-interface %s doesn't have unique encapsulation" % (sub_ifname))
msgs.append("sub-interface %s does not have unique encapsulation" % (sub_ifname))
result = False
if 'l2xc' in sub_iface:
if has_lcp(yaml, sub_ifname):