Fix GetNetdevAttrs test 47/47047/2
authorDariusz Michaluk <d.michaluk@samsung.com>
Thu, 27 Aug 2015 15:32:21 +0000 (17:32 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Fri, 28 Aug 2015 14:30:04 +0000 (07:30 -0700)
[Feature]       N/A
[Cause]         N/A
[Solution]      N/A
[Verification]  Build, install, run tests

Change-Id: I75ba46b0a923622e07d857535496615ac1708ce3

tests/unit_tests/server/ut-zone.cpp

index 0072d74..aefb29a 100644 (file)
@@ -294,6 +294,7 @@ BOOST_AUTO_TEST_CASE(GetNetdevAttrs)
     bool gotMtu = false;
     bool gotFlags = false;
     bool gotType = false;
+    bool gotLink = false;
     for (auto& attr : attrs) {
         if (std::get<0>(attr) == "mtu") {
             BOOST_CHECK(!gotMtu);
@@ -306,6 +307,9 @@ BOOST_AUTO_TEST_CASE(GetNetdevAttrs)
             BOOST_CHECK(!gotType);
             BOOST_CHECK_EQUAL(1 /*IFF_802_1Q_VLAN */, stol(std::get<1>(attr)));
             gotType = true;
+        } else if (std::get<0>(attr) == "link") {
+            BOOST_CHECK(!gotLink);
+            gotLink = true;
         } else {
             BOOST_CHECK_MESSAGE(false, "Got unexpected option " + std::get<0>(attr));
         }