From 7f10f711c4b15361cd1885a1847c4fffe5f6d03c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pe=C3=B1aranda?= Date: Tue, 9 Jan 2024 18:00:30 -0300 Subject: [PATCH] [tests] Check LXD factory's bridge_name_for works --- tests/lxd/test_lxd_backend.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/lxd/test_lxd_backend.cpp b/tests/lxd/test_lxd_backend.cpp index ecae440869..d93dc3a822 100644 --- a/tests/lxd/test_lxd_backend.cpp +++ b/tests/lxd/test_lxd_backend.cpp @@ -2355,3 +2355,10 @@ TEST_F(LXDBackend, addsNetworkInterface) EXPECT_EQ(times_called, 1u); } + +TEST_F(LXDBackend, backendReturnsCorrectBridgeName) +{ + CustomLXDFactory factory{std::move(mock_network_access_manager), data_dir.path(), base_url}; + + EXPECT_EQ(factory.bridge_name_for("eth7"), "br-eth7"); +}