Uh oh!
There was an error while loading. Please reload this page.
FEATURE: STACKI-1631 Remove ifconfig and replace with ip - #845
Conversation
| import socket | ||
| from xml.etree.ElementTree import Element, SubElement, ElementTree | ||
| import ipaddress |
There was a problem hiding this comment.
this looks like it's already imported
6b74538 to
70b5d60Compare| os.remove(ifDhcpFile) | ||
| # Force network reconfiguration | ||
| cmd = ['/sbin/ifconfig', interface, addr, 'netmask', netmask] | ||
| ip_mask = ipaddress.ip_interface(join(addr,'/',netmask)) |
There was a problem hiding this comment.
Where is this join function coming from? The syntax for joining a string together with join is:'\'.join([addr, netmask]). I believe this would throw a NameError exception. Which means your test is likely not causing this code to run.
I looked at last night's coverage report, and the setNetwork function isn't being called by any of the tests in develop. So, it is possible that setNetwork is dead code. You'll need to trace it down and see if anything calls it.
Also: You can get a coverage report for your own branch by either adding _cov to the end of your branch name or by putting the work coverage in the last commit message.
Compared
/tmp/site.attrgenerated by ifconfig and ip and no difference was found.