Skip to content

Commit 2f83bc8

Browse files
authored
Merge pull request #5318 from smitterl/fix_iface_options
iface_options: use multiline regex for checks
2 parents 1a33783 + dc88738 commit 2f83bc8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libvirt/tests/src/virtual_network/iface_options.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,8 @@ def check_user_network(session):
404404
" on guest")
405405
# Check gateway address
406406
gateway = str(utils_net.get_default_gateway(False, session))
407-
if expect_gw not in gateway:
407+
pattern = re.compile(expect_gw, re.MULTILINE)
408+
if not pattern.search(gateway):
408409
test.fail("The gateway on guest is %s, while expect is %s" %
409410
(gateway, expect_gw))
410411
# Check dns server address

0 commit comments

Comments
 (0)