Skip to content

Commit

Permalink
When switch state replay file is provided, just use the passed in config
Browse files Browse the repository at this point in the history
Summary:
The idea behind this test is to get to the same state
as was on the switch we pulled the state (and config) from.
So use the passed in config and not the onePortPerInterfaceConfig

Reviewed By: zechengh09

Differential Revision: D61426941

fbshipit-source-id: a04831f2971ecb5f76971326d6acf09377e7dab8
  • Loading branch information
Jasmeet Bagga authored and facebook-github-bot committed Aug 18, 2024
1 parent 96b540c commit fbc60d5
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ class AgentSwitchStateReplayTest : public AgentHwTest {
public:
cfg::SwitchConfig initialConfig(
const AgentEnsemble& ensemble) const override {
if (FLAGS_replay_switch_state_file.size()) {
// Config must be from the same switch that switch
// state was pulled from.
return *AgentConfig::fromDefaultFile()->thrift.sw();
;
}
return utility::onePortPerInterfaceConfig(
ensemble.getSw(), ensemble.masterLogicalPortIds());
}
Expand Down

0 comments on commit fbc60d5

Please sign in to comment.