Commit f2c0ce1a authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[2596] Error message in unlikely case that the system has nonexistent0 interface.

parent f3709cc1
......@@ -52,11 +52,18 @@ public:
// There must be some interface detected
if (ifaces.empty()) {
// We can't use ASSERT in constructor
ADD_FAILURE() << "No interfaces detected.";
}
valid_iface_ = ifaces.begin()->getName();
bogus_iface_ = "nonexisting0";
if (IfaceMgr::instance().getIface(bogus_iface_)) {
ADD_FAILURE() << "The '" << bogus_iface_ << "' exists on this system"
<< " while the test assumes that it doesn't to execute"
<< " some negative scenarios. Can't continue this test";
}
}
~Dhcp6ParserTest() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment