Skip to content

Commit b03cce2

Browse files
authored
Fix test worlds (#100)
Signed-off-by: Louise Poubel <louise@openrobotics.org>
1 parent 1b291a1 commit b03cce2

File tree

3 files changed

+17
-17
lines changed

3 files changed

+17
-17
lines changed

src/FuelClient_TEST.cc

+4-4
Original file line numberDiff line numberDiff line change
@@ -962,13 +962,13 @@ TEST_F(FuelClientTest, DownloadWorld)
962962
// Check it was downloaded to `1`
963963
EXPECT_EQ(path, common::cwd() +
964964
"/test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
965-
"Test world/1");
965+
"Test world/2");
966966
EXPECT_TRUE(common::exists(
967967
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
968-
"Test world/1"));
968+
"Test world/2"));
969969
EXPECT_TRUE(common::exists(
970970
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/"
971-
"Test world/1/test.world"));
971+
"Test world/2/test.world"));
972972

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

986986
// Try using nonexistent URL

src/Interface_TEST.cc

+11-11
Original file line numberDiff line numberDiff line change
@@ -178,11 +178,11 @@ TEST(Interface, FetchResources)
178178

179179
// Check it was downloaded to `1`
180180
EXPECT_EQ(path, common::cwd() + "/test_cache/fuel.ignitionrobotics.org/"
181-
"openrobotics/worlds/Test world/1");
181+
"openrobotics/worlds/Test world/2");
182182
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
183-
"openrobotics/worlds/Test world/1"));
183+
"openrobotics/worlds/Test world/2"));
184184
EXPECT_TRUE(common::exists("test_cache/fuel.ignitionrobotics.org/"
185-
"openrobotics/worlds/Test world/1/test.world"));
185+
"openrobotics/worlds/Test world/2/test.world"));
186186

187187
// Check it is cached
188188
{
@@ -191,17 +191,17 @@ TEST(Interface, FetchResources)
191191
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res);
192192
EXPECT_EQ(common::cwd() +
193193
"/test_cache/fuel.ignitionrobotics.org/openrobotics/worlds/"
194-
"Test world/1", cachedPath);
194+
"Test world/2", cachedPath);
195195
}
196196
}
197197

198198
// World file
199199
{
200200
// Check neither file nor its world are cached
201201
common::URI worldUrl{
202-
"https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/1/"};
202+
"https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/2/"};
203203
common::URI worldFileUrl{
204-
"https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/1/"
204+
"https://fuel.ignitionrobotics.org/1.0/chapulina/worlds/Test world/2/"
205205
"files/thumbnails/1.png"};
206206

207207
{
@@ -220,12 +220,12 @@ TEST(Interface, FetchResources)
220220

221221
// Check entire world was downloaded to `1`
222222
EXPECT_TRUE(common::exists(
223-
"test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/1"));
223+
"test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/2"));
224224
EXPECT_EQ(path, common::cwd() +
225-
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/1/"
225+
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/2/"
226226
"thumbnails/1.png");
227227
EXPECT_TRUE(common::exists(
228-
"test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/1/"
228+
"test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/2/"
229229
"test.world"));
230230

231231
// Check world is cached
@@ -234,7 +234,7 @@ TEST(Interface, FetchResources)
234234
EXPECT_TRUE(res);
235235
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res);
236236
EXPECT_EQ(common::cwd() +
237-
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/1",
237+
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/2",
238238
cachedPath);
239239
}
240240

@@ -244,7 +244,7 @@ TEST(Interface, FetchResources)
244244
EXPECT_TRUE(res);
245245
EXPECT_EQ(Result(ResultType::FETCH_ALREADY_EXISTS), res);
246246
EXPECT_EQ(common::cwd() +
247-
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/1"
247+
"/test_cache/fuel.ignitionrobotics.org/chapulina/worlds/Test world/2"
248248
"/thumbnails/1.png",
249249
cachedPath);
250250
}

src/ign_src_TEST.cc

+2-2
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,10 @@ TEST(CmdLine, WorldDownloadUnversioned)
428428
EXPECT_TRUE(ignition::common::isDirectory(
429429
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world"));
430430
EXPECT_TRUE(ignition::common::isDirectory(
431-
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world/1"));
431+
"test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/Test world/2"));
432432
EXPECT_TRUE(ignition::common::isFile(
433433
std::string("test_cache/fuel.ignitionrobotics.org/OpenRobotics/worlds/")
434-
+ "Test world/1/test.world"));
434+
+ "Test world/2/test.world"));
435435

436436
clearIOStreams(stdOutBuffer, stdErrBuffer);
437437
restoreIO();

0 commit comments

Comments
 (0)