Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed test - Download world 2 #110

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/FuelClient_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -962,13 +962,13 @@ TEST_F(FuelClientTest, DownloadWorld)
// Check it was downloaded to `1`
EXPECT_EQ(path, common::cwd() +
"/test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
"Test world/1");
"Test world/2");
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
"Test world/1"));
"Test world/2"));
EXPECT_TRUE(common::exists(
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
"Test world/1/test.world"));
"Test world/2/test.world"));

// Check it wasn't downloaded to world root directory
EXPECT_FALSE(common::exists(
Expand All @@ -980,7 +980,7 @@ TEST_F(FuelClientTest, DownloadWorld)
EXPECT_TRUE(res3);
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res3);
EXPECT_EQ(common::cwd() + "/test_cache/fuel.ignitionrobotics.org"
"/OpenRobotics/worlds/Test world/1", cachedPath);
"/OpenRobotics/worlds/Test world/2", cachedPath);
}

// Try using nonexistent URL
Expand Down
8 changes: 4 additions & 4 deletions src/Interface_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,11 @@ TEST(Interface, FetchResources)

// Check it was downloaded to `1`
EXPECT_EQ(path, common::cwd() + "/test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1");
"openrobotics/worlds/Test world/2");
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1"));
"openrobotics/worlds/Test world/2"));
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
"openrobotics/worlds/Test world/1/test.world"));
"openrobotics/worlds/Test world/2/test.world"));

// Check it is cached
{
Expand All @@ -191,7 +191,7 @@ TEST(Interface, FetchResources)
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res);
EXPECT_EQ(common::cwd() +
"/test_cache/fuel.ignitionrobotics.org/openrobotics/worlds/"
"Test world/1", cachedPath);
"Test world/2", cachedPath);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/ign_src_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -428,10 +428,10 @@ TEST(CmdLine, WorldDownloadUnversioned)
EXPECT_TRUE(ignition::common::isDirectory(
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world"));
EXPECT_TRUE(ignition::common::isDirectory(
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world/1"));
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world/2"));
EXPECT_TRUE(ignition::common::isFile(
std::string("test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/")
+ "Test world/1/test.world"));
+ "Test world/2/test.world"));

clearIOStreams(stdOutBuffer, stdErrBuffer);
restoreIO();
Expand Down