face+mgmt: enable local fields through ProtocolFactory::createFace

refs #3731

Change-Id: I569dae59cda150ffcb1c0ff1d01a575d8850beca
diff --git a/tests/daemon/face/ethernet-factory.t.cpp b/tests/daemon/face/ethernet-factory.t.cpp
index b9e9cda..248a668 100644
--- a/tests/daemon/face/ethernet-factory.t.cpp
+++ b/tests/daemon/face/ethernet-factory.t.cpp
@@ -69,16 +69,19 @@
   createFace(factory,
              FaceUri("ether://[08:00:27:01:01:01]"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("ether://[08:00:27:01:01:01]"),
              ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("ether://[08:00:27:01:01:01]"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 }
 
diff --git a/tests/daemon/face/factory-test-common.hpp b/tests/daemon/face/factory-test-common.hpp
index 8676be5..e842ced 100644
--- a/tests/daemon/face/factory-test-common.hpp
+++ b/tests/daemon/face/factory-test-common.hpp
@@ -44,9 +44,10 @@
 createFace(ProtocolFactory& factory,
            const FaceUri& uri,
            ndn::nfd::FacePersistency persistency,
+           bool wantLocalFieldsEnabled,
            const CreateFaceExpectedResult& expected)
 {
-  factory.createFace(uri, persistency,
+  factory.createFace(uri, persistency, wantLocalFieldsEnabled,
                      [expected] (const shared_ptr<Face>& newFace) {
                        BOOST_CHECK_EQUAL(CreateFaceExpectedResult::SUCCESS, expected.result);
                      },
diff --git a/tests/daemon/face/tcp-channel.t.cpp b/tests/daemon/face/tcp-channel.t.cpp
index d04ea26..f8dae5d 100644
--- a/tests/daemon/face/tcp-channel.t.cpp
+++ b/tests/daemon/face/tcp-channel.t.cpp
@@ -77,7 +77,7 @@
   void
   connect(TcpChannel& channel)
   {
-    channel.connect(listenerEp,
+    channel.connect(listenerEp, false,
       [this] (const shared_ptr<Face>& newFace) {
         BOOST_REQUIRE(newFace != nullptr);
         connectFaceClosedSignal(*newFace, [this] { limitedIo.afterOp(); });
@@ -177,7 +177,7 @@
   // do not listen
 
   auto channel = makeChannel(A());
-  channel->connect(tcp::Endpoint(address, 7040),
+  channel->connect(tcp::Endpoint(address, 7040), false,
     [this] (const shared_ptr<Face>&) {
       BOOST_FAIL("Connect succeeded when it should have failed");
       this->limitedIo.afterOp();
diff --git a/tests/daemon/face/tcp-factory.t.cpp b/tests/daemon/face/tcp-factory.t.cpp
index 7418b26..a617011 100644
--- a/tests/daemon/face/tcp-factory.t.cpp
+++ b/tests/daemon/face/tcp-factory.t.cpp
@@ -79,6 +79,7 @@
   createFace(factory,
              FaceUri("tcp4://127.0.0.1:6363"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 504, "No channels available to connect"});
 
   factory.createChannel("127.0.0.1", "20071");
@@ -86,6 +87,7 @@
   createFace(factory,
              FaceUri("tcp4://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::SUCCESS, 0, ""});
 }
 
@@ -99,12 +101,14 @@
   createFace(factory,
              FaceUri("tcp4://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406,
                "Outgoing TCP faces only support persistent persistency"});
 
   createFace(factory,
              FaceUri("tcp4://127.0.0.1:20071"),
              ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406,
                "Outgoing TCP faces only support persistent persistency"});
 }
@@ -143,6 +147,7 @@
 
   factory.createFace(FaceUri("tcp4://192.0.2.1:20070"),
                      ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+                     false,
                      bind(&FaceCreateTimeoutFixture::onFaceCreated, this, _1),
                      bind(&FaceCreateTimeoutFixture::onConnectFailed, this, _2));
 
diff --git a/tests/daemon/face/udp-factory.t.cpp b/tests/daemon/face/udp-factory.t.cpp
index eb27f3a..5e46d97 100644
--- a/tests/daemon/face/udp-factory.t.cpp
+++ b/tests/daemon/face/udp-factory.t.cpp
@@ -151,6 +151,7 @@
   createFace(factory,
              FaceUri("udp4://127.0.0.1:6363"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 504, "No channels available to connect"});
 
   factory.createChannel("127.0.0.1", "20071");
@@ -158,16 +159,19 @@
   createFace(factory,
              FaceUri("udp4://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::SUCCESS, 0, ""});
   //test the upgrade
   createFace(factory,
              FaceUri("udp4://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::SUCCESS, 0, ""});
 
   createFace(factory,
              FaceUri("udp4://127.0.0.1:20072"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::SUCCESS, 0, ""});
 }
 
@@ -180,6 +184,7 @@
   createFace(factory,
              FaceUri("udp4://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406,
                "Outgoing unicast UDP faces do not support on-demand persistency"});
 }
diff --git a/tests/daemon/face/unix-stream-factory.t.cpp b/tests/daemon/face/unix-stream-factory.t.cpp
index 1c33122..832841f 100644
--- a/tests/daemon/face/unix-stream-factory.t.cpp
+++ b/tests/daemon/face/unix-stream-factory.t.cpp
@@ -80,16 +80,19 @@
   createFace(factory,
              FaceUri("unix:///var/run/nfd.sock"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("unix:///var/run/nfd.sock"),
              ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("unix:///var/run/nfd.sock"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 }
 
diff --git a/tests/daemon/face/websocket-factory.t.cpp b/tests/daemon/face/websocket-factory.t.cpp
index cb00922..e7abef2 100644
--- a/tests/daemon/face/websocket-factory.t.cpp
+++ b/tests/daemon/face/websocket-factory.t.cpp
@@ -62,16 +62,19 @@
   createFace(factory,
              FaceUri("ws://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERMANENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("ws://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_ON_DEMAND,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 
   createFace(factory,
              FaceUri("ws://127.0.0.1:20070"),
              ndn::nfd::FACE_PERSISTENCY_PERSISTENT,
+             false,
              {CreateFaceExpectedResult::FAILURE, 406, "Unsupported protocol"});
 }