Skip to content

Commit

Permalink
Fix speed change test to copy config at CB
Browse files Browse the repository at this point in the history
Summary:
As titled. If the old config is preserved on the box, it will not get updated and hence the test keep running with old config.

This has caused link tests failing on conveyor with old config preserved. Fixing this by explicitly checking cb

Differential Revision: D62006182

fbshipit-source-id: 2a394242a0e5d36dd75d4d99c2ec1df42b167d77
  • Loading branch information
Ron He authored and facebook-github-bot committed Aug 30, 2024
1 parent d68eeec commit 3fdd01d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fboss/agent/test/link_tests/SpeedChangeTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,8 @@ void SpeedChangeTest::setupConfigFlag() {
originalConfigCopy =
linkTestDir + "/agent_speed_change_test_original_config.conf";

// Create a copy of the original config if we haven't created one before.
if (!boost::filesystem::exists(originalConfigCopy)) {
// Likely a coldboot iteration
// Create a copy of the original config during coldboot
if (sw()->getBootType() == BootType::COLD_BOOT) {
utilCreateDir(linkTestDir);
boost::filesystem::copy_file(FLAGS_config, originalConfigCopy);
}
Expand Down

0 comments on commit 3fdd01d

Please sign in to comment.