mgmt: FaceManager no longer owns FaceSystem
refs #3904
Change-Id: I2ef6fd36a51493eea27d8eb0e1c7dc022766f948
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.cpp b/tests/daemon/mgmt/face-manager-command-fixture.cpp
index 1b73841..989ff7b 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.cpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -32,7 +32,8 @@
: face(getGlobalIoService(), keyChain, {true, true})
, dispatcher(face, keyChain, ndn::security::SigningInfo())
, authenticator(CommandAuthenticator::create())
- , manager(faceTable, dispatcher, *authenticator)
+ , faceSystem(faceTable)
+ , manager(faceSystem, dispatcher, *authenticator)
{
dispatcher.addTopPrefix("/localhost/nfd");
diff --git a/tests/daemon/mgmt/face-manager-command-fixture.hpp b/tests/daemon/mgmt/face-manager-command-fixture.hpp
index 8d66309..0bde982 100644
--- a/tests/daemon/mgmt/face-manager-command-fixture.hpp
+++ b/tests/daemon/mgmt/face-manager-command-fixture.hpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2014-2016, Regents of the University of California,
+ * Copyright (c) 2014-2017, Regents of the University of California,
* Arizona Board of Regents,
* Colorado State University,
* University Pierre & Marie Curie, Sorbonne University,
@@ -45,10 +45,12 @@
~FaceManagerCommandNode();
public:
- FaceTable faceTable;
- ndn::util::DummyClientFace face;
+ ndn::util::DummyClientFace face; ///< internal client face used by management
ndn::mgmt::Dispatcher dispatcher;
shared_ptr<CommandAuthenticator> authenticator;
+
+ FaceTable faceTable;
+ FaceSystem faceSystem;
FaceManager manager;
};
diff --git a/tests/daemon/mgmt/face-manager.t.cpp b/tests/daemon/mgmt/face-manager.t.cpp
index 6b54d74..ccf7175 100644
--- a/tests/daemon/mgmt/face-manager.t.cpp
+++ b/tests/daemon/mgmt/face-manager.t.cpp
@@ -25,8 +25,7 @@
#include "mgmt/face-manager.hpp"
#include "core/random.hpp"
-#include "face/tcp-factory.hpp"
-#include "face/udp-factory.hpp"
+#include "face/protocol-factory.hpp"
#include "nfd-manager-common-fixture.hpp"
#include "../face/dummy-face.hpp"
@@ -44,7 +43,8 @@
public:
FaceManagerFixture()
: m_faceTable(m_forwarder.getFaceTable())
- , m_manager(m_faceTable, m_dispatcher, *m_authenticator)
+ , m_faceSystem(m_faceTable)
+ , m_manager(m_faceSystem, m_dispatcher, *m_authenticator)
{
setTopPrefix();
setPrivilege("faces");
@@ -110,6 +110,7 @@
protected:
FaceTable& m_faceTable;
+ FaceSystem m_faceSystem;
FaceManager m_manager;
};