Skip to content

Commit

Permalink
Fix compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
superchild committed Jun 14, 2023
1 parent 42d4951 commit 4e4afb3
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions orchagent/intfsorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ extern bool gIsNatSupported;
extern NeighOrch *gNeighOrch;
extern string gMySwitchType;
extern int32_t gVoqMySwitchId;
extern RouteOrch *gRouteOrch;

const int IntfsOrch::intfsorch_pri = 35;

Expand Down
7 changes: 6 additions & 1 deletion tests/mock_tests/bufferorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,8 +217,13 @@ namespace bufferorch_test
ASSERT_EQ(gVrfOrch, nullptr);
gVrfOrch = new VRFOrch(m_app_db.get(), APP_VRF_TABLE_NAME, m_state_db.get(), STATE_VRF_OBJECT_TABLE_NAME);

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());

const int fdborch_pri = 20;

Expand Down
9 changes: 7 additions & 2 deletions tests/mock_tests/flowcounterrouteorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,13 @@ namespace flowcounterrouteorch_test
gVrfOrch = new VRFOrch(m_app_db.get(), APP_VRF_TABLE_NAME, m_state_db.get(), STATE_VRF_OBJECT_TABLE_NAME);
gDirectory.set(gVrfOrch);

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());

const int fdborch_pri = 20;

Expand Down Expand Up @@ -397,4 +402,4 @@ namespace flowcounterrouteorch_test
vrf_consumer->addToSync(entries);
static_cast<Orch *>(gVrfOrch)->doTask();
}
}
}
9 changes: 7 additions & 2 deletions tests/mock_tests/intfsorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,13 @@ namespace intfsorch_test
gVrfOrch = new VRFOrch(m_app_db.get(), APP_VRF_TABLE_NAME, m_state_db.get(), STATE_VRF_OBJECT_TABLE_NAME);
gDirectory.set(gVrfOrch);

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());

const int fdborch_pri = 20;

Expand Down Expand Up @@ -327,4 +332,4 @@ namespace intfsorch_test
ASSERT_EQ(current_create_count + 1, create_rif_count);
ASSERT_EQ(current_remove_count + 1, remove_rif_count);
}
}
}
6 changes: 5 additions & 1 deletion tests/mock_tests/mux_rollback_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,11 @@ namespace mux_rollback_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
7 changes: 6 additions & 1 deletion tests/mock_tests/qosorch_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,13 @@ namespace qosorch_test
ASSERT_EQ(gVrfOrch, nullptr);
gVrfOrch = new VRFOrch(m_app_db.get(), APP_VRF_TABLE_NAME, m_state_db.get(), STATE_VRF_OBJECT_TABLE_NAME);

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());

const int fdborch_pri = 20;

Expand Down

0 comments on commit 4e4afb3

Please sign in to comment.