Skip to content

dns: add test case for mdns connection option

Vojtech Bubela requested to merge mdns_test into main

I added test according to this BZ. However i encountered a problem i dont know how to solve. There is always failure on the last step if the test Then "+mDNS" is visible with command "resolvectl status eth2". Here is the error log:

Then "+mDNS" is visible with command "resolvectl status eth2" ... failed in 0.006s
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/behave/model.py", line 1329, in run
    match.run(runner.context)
  File "/usr/local/lib/python3.10/site-packages/behave/matchers.py", line 98, in run
    self.func(context, *args, **kwargs)
  File "features/steps/commands.py", line 399, in pattern_visible_command
    return check_pattern_command(context, command, pattern, seconds)
  File "features/steps/commands.py", line 275, in check_pattern_command
    ret = proc.expect([pattern, pexpect.EOF])
  File "/usr/lib/python3.10/site-packages/pexpect/spawnbase.py", line 342, in expect
    compiled_pattern_list = self.compile_pattern_list(pattern)
  File "/usr/lib/python3.10/site-packages/pexpect/spawnbase.py", line 232, in compile_pattern_list
    compiled_pattern_list.append(re.compile(p, compile_flags))
  File "/usr/lib64/python3.10/re.py", line 251, in compile
    return _compile(pattern, flags)
  File "/usr/lib64/python3.10/re.py", line 303, in _compile
    p = sre_compile.compile(pattern, flags)
  File "/usr/lib64/python3.10/sre_compile.py", line 788, in compile
    p = sre_parse.parse(p, flags)
  File "/usr/lib64/python3.10/sre_parse.py", line 955, in parse
    p = _parse_sub(source, state, flags & SRE_FLAG_VERBOSE, 0)
  File "/usr/lib64/python3.10/sre_parse.py", line 444, in _parse_sub
    itemsappend(_parse(source, state, verbose, nested + 1,
  File "/usr/lib64/python3.10/sre_parse.py", line 669, in _parse
    raise source.error("nothing to repeat",
re.error: nothing to repeat at position 0

I am not sure if this is the correct way how to use is visible but if i dont set the connection.mdns yes then `Then "-mDNS" is visible with command "resolvectl status eth2" passes.. .

Any input is appreciated!

Edited by Filip Pokryvka

Merge request reports