Skip to content

Commit

Permalink
adjust intfsorch in test
Browse files Browse the repository at this point in the history
Signed-off-by: yanjun deng <[email protected]>
  • Loading branch information
yanjundeng committed May 25, 2024
1 parent 56c7dc6 commit a338736
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 7 additions & 1 deletion tests/mock_tests/flexcounter_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,14 @@ namespace flexcounter_test
gPortsOrch->addExistingData(&portTable);
static_cast<Orch *>(gPortsOrch)->doTask();


vector<table_name_with_pri_t> intf_tables = {
{ APP_INTF_TABLE_NAME, IntfsOrch::intfsorch_pri},
{ APP_SAG_TABLE_NAME, IntfsOrch::intfsorch_pri}
};

ASSERT_EQ(gIntfsOrch, nullptr);
gIntfsOrch = new IntfsOrch(m_app_db.get(), APP_INTF_TABLE_NAME, gVrfOrch, m_chassis_app_db.get());
gIntfsOrch = new IntfsOrch(m_app_db.get(), intf_tables, gVrfOrch, m_chassis_app_db.get());
}

virtual void TearDown() override
Expand Down
6 changes: 5 additions & 1 deletion tests/mock_tests/mock_orch_test.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,11 @@ namespace mock_orch_test
gDirectory.set(gVrfOrch);
ut_orch_list.push_back((Orch **)&gVrfOrch);

gIntfsOrch = new IntfsOrch(m_app_db.get(), APP_INTF_TABLE_NAME, gVrfOrch, m_chassis_app_db.get());
vector<table_name_with_pri_t> intf_tables = {
{ APP_INTF_TABLE_NAME, IntfsOrch::intfsorch_pri},
{ APP_SAG_TABLE_NAME, IntfsOrch::intfsorch_pri}
};
gIntfsOrch = new IntfsOrch(m_app_db.get(), intf_tables, gVrfOrch, m_chassis_app_db.get());
gDirectory.set(gIntfsOrch);
ut_orch_list.push_back((Orch **)&gIntfsOrch);

Expand Down

0 comments on commit a338736

Please sign in to comment.