Skip to content

Commit

Permalink
Fix tests failing due to change in return value
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero committed Jan 19, 2021
1 parent edd4ff5 commit 12ca7f6
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/integration/log_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ TEST_F(LogSystemTest, LogDefaults)
std::string homeOrig;
common::env(IGN_HOMEDIR, homeOrig);
std::string homeFake = common::joinPaths(this->logsDir, "default");
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()));

// Test case 1:
// No path specified, on both command line and SDF. This does not go through
Expand Down Expand Up @@ -423,7 +423,7 @@ TEST_F(LogSystemTest, LogDefaults)
#endif

// Revert environment variable after test is done
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()));
}

/////////////////////////////////////////////////
Expand Down Expand Up @@ -479,7 +479,7 @@ TEST_F(LogSystemTest, LogPaths)
std::string homeOrig;
common::env(IGN_HOMEDIR, homeOrig);
std::string homeFake = common::joinPaths(this->logsDir, "default");
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()));

// Store number of files before running
auto logPath = common::joinPaths(homeFake.c_str(), ".ignition", "gazebo",
Expand Down Expand Up @@ -692,7 +692,7 @@ TEST_F(LogSystemTest, LogPaths)
#endif

// Revert environment variable after test is done
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()));

this->RemoveLogsDir();
}
Expand Down Expand Up @@ -1569,7 +1569,7 @@ TEST_F(LogSystemTest, LogResources)
std::string homeOrig;
common::env(IGN_HOMEDIR, homeOrig);
std::string homeFake = common::joinPaths(this->logsDir, "default");
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()));

const std::string recordPath = this->logDir;
std::string statePath = common::joinPaths(recordPath, "state.tlog");
Expand Down Expand Up @@ -1634,7 +1634,7 @@ TEST_F(LogSystemTest, LogResources)
"models", "x2 config 1")));

// Revert environment variable after test is done
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeOrig.c_str()));

// Remove artifacts
this->RemoveLogsDir();
Expand All @@ -1656,7 +1656,7 @@ TEST_F(LogSystemTest, LogTopics)
std::string homeOrig;
common::env(IGN_HOMEDIR, homeOrig);
std::string homeFake = common::joinPaths(this->logsDir, "default");
EXPECT_EQ(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()), 0);
EXPECT_TRUE(ignition::common::setenv(IGN_HOMEDIR, homeFake.c_str()));

const std::string recordPath = this->logDir;
std::string statePath = common::joinPaths(recordPath, "state.tlog");
Expand Down

0 comments on commit 12ca7f6

Please sign in to comment.