From a4a542a1fc67bf9ffaf56fa12ab1d1afec415835 Mon Sep 17 00:00:00 2001 From: Lawrence Lee Date: Fri, 16 Feb 2024 23:23:33 +0000 Subject: [PATCH] Add gPortsOrch to directory for unittests Signed-off-by: Lawrence Lee --- tests/mock_tests/flowcounterrouteorch_ut.cpp | 1 + tests/mock_tests/routeorch_ut.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/mock_tests/flowcounterrouteorch_ut.cpp b/tests/mock_tests/flowcounterrouteorch_ut.cpp index cf80bda5bf6..42c96c4c632 100644 --- a/tests/mock_tests/flowcounterrouteorch_ut.cpp +++ b/tests/mock_tests/flowcounterrouteorch_ut.cpp @@ -135,6 +135,7 @@ namespace flowcounterrouteorch_test ASSERT_EQ(gPortsOrch, nullptr); gPortsOrch = new PortsOrch(m_app_db.get(), m_state_db.get(), ports_tables, m_chassis_app_db.get()); + gDirectory.set(gPortsOrch); vector vnet_tables = { APP_VNET_RT_TABLE_NAME, diff --git a/tests/mock_tests/routeorch_ut.cpp b/tests/mock_tests/routeorch_ut.cpp index 0bfe5ad0732..5904f7b86f2 100644 --- a/tests/mock_tests/routeorch_ut.cpp +++ b/tests/mock_tests/routeorch_ut.cpp @@ -182,6 +182,7 @@ namespace routeorch_test ASSERT_EQ(gPortsOrch, nullptr); gPortsOrch = new PortsOrch(m_app_db.get(), m_state_db.get(), ports_tables, m_chassis_app_db.get()); + gDirectory.set(gPortsOrch); vector flex_counter_tables = { CFG_FLEX_COUNTER_TABLE_NAME