Skip to content

Conversation

@megkido
Copy link

@megkido megkido commented Oct 19, 2020

Compared /tmp/site.attr generated by ifconfig and ip and no difference was found.

frontend-0-0:/export/src/stacki/test-framework/test-suites/integration/tests/wizard # diff /tmp/site.attrs /tmp/site.attrs.org
16c16
< Kickstart_PrivateRootPassword:<omitted>
---
> Kickstart_PrivateRootPassword:<omitted>

import socket
from xml.etree.ElementTree import Element, SubElement, ElementTree

import ipaddress
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks like it's already imported

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

duhhhh

@megkido megkido force-pushed the feature/no-more-ifconfig branch from 6b74538 to 70b5d60 Compare October 20, 2020 16:27
os.remove(ifDhcpFile)
# Force network reconfiguration
cmd = ['/sbin/ifconfig', interface, addr, 'netmask', netmask]
ip_mask = ipaddress.ip_interface(join(addr,'/',netmask))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants