eth: Support looking up alternate interace channels
This makes it possible to use the GetEthDevice command to look up
interfaces other than the default NCSI interface.
Change-Id: I3a5563743a28b39adc753d8957f68f0bc330cf3a
Signed-off-by: William A. Kennington III <wak@google.com>
diff --git a/test/handler_unittest.cpp b/test/handler_unittest.cpp
index 99782fa..b93e877 100644
--- a/test/handler_unittest.cpp
+++ b/test/handler_unittest.cpp
@@ -16,12 +16,10 @@
TEST(HandlerTest, EthCheckValidHappy)
{
- // The code returns compiled-in information, and therefore cannot really
- // fail.
Handler h;
- std::tuple<std::uint8_t, std::string> result = h.getEthDetails();
- EXPECT_EQ(1, std::get<0>(result));
- EXPECT_STREQ("eth0", std::get<1>(result).c_str());
+ std::tuple<std::uint8_t, std::string> result = h.getEthDetails("et");
+ EXPECT_EQ(12, std::get<0>(result));
+ EXPECT_STREQ("et", std::get<1>(result).c_str());
}
TEST(HandlerTest, CableCheckIllegalPath)