Commit 1f27698e authored by Tomek Mrugalski's avatar Tomek Mrugalski 🛰
Browse files

[1239] Fixed problem with exceptions in interface detection.

parent 6c7201e6
......@@ -14,6 +14,7 @@
#include <config.h>
#include <iostream>
#include <fstream>
#include <sstream>
#include <arpa/inet.h>
......@@ -28,6 +29,7 @@ using namespace isc;
using namespace isc::dhcp;
namespace {
const char* const INTERFACE_FILE = "interfaces.txt";
class NakedDhcpv4Srv: public Dhcpv4Srv {
// "naked" Interface Manager, exposes internal fields
......@@ -54,9 +56,14 @@ public:
class Dhcpv4SrvTest : public ::testing::Test {
public:
Dhcpv4SrvTest() {
unlink(INTERFACE_FILE);
fstream fakeifaces(INTERFACE_FILE, ios::out|ios::trunc);
fakeifaces << "lo ::1";
fakeifaces.close();
}
~Dhcpv4SrvTest() {
unlink(INTERFACE_FILE);
};
};
......
eth0 fe80::1
# This file is needed to make stub interface detection work.
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