Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
methylDragon committed May 11, 2022
1 parent 8d26ed2 commit 4edd502
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 21 deletions.
14 changes: 7 additions & 7 deletions src/ign_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,16 +110,16 @@ TEST(CmdLine,
IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(ModelListCustomServerPretty))
{
auto output = custom_exec_str(
g_listCmd + " -t model -u https://staging-fuel.ignitionrobotics.org");
g_listCmd + " -t model -u https://staging-fuel.gazebosim.org");

EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"),
EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"),
std::string::npos) << output;
EXPECT_NE(output.find("owners"), std::string::npos) << output;
EXPECT_NE(output.find("models"), std::string::npos) << output;

EXPECT_EQ(output.find("https://fuel.ignitionrobotics.org"), std::string::npos)
<< output;
EXPECT_EQ(output.find("https://staging-fuel.ignitionrobotics.org/1.0/"),
EXPECT_EQ(output.find("https://staging-fuel.gazebosim.org/1.0/"),
std::string::npos) << output;
}

Expand All @@ -128,8 +128,8 @@ TEST(CmdLine,
TEST(CmdLine, IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldListConfigServerUgly))
{
auto output = custom_exec_str(g_listCmd +
" -t world --raw -u https://staging-fuel.ignitionrobotics.org");
EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"),
" -t world --raw -u https://staging-fuel.gazebosim.org");
EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"),
std::string::npos) << output;
EXPECT_EQ(output.find("owners"), std::string::npos) << output;
}
Expand All @@ -140,9 +140,9 @@ TEST(CmdLine,
IGN_UTILS_TEST_ENABLED_ONLY_ON_LINUX(WorldListCustomServerPretty))
{
auto output = custom_exec_str(
g_listCmd + " -t world -u https://staging-fuel.ignitionrobotics.org");
g_listCmd + " -t world -u https://staging-fuel.gazebosim.org");

EXPECT_NE(output.find("https://staging-fuel.ignitionrobotics.org"),
EXPECT_NE(output.find("https://staging-fuel.gazebosim.org"),
std::string::npos) << output;
EXPECT_NE(output.find("owners"), std::string::npos) << output;
EXPECT_NE(output.find("worlds"), std::string::npos) << output;
Expand Down
28 changes: 14 additions & 14 deletions src/ign_src_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,10 @@ TEST_F(CmdLine, ModelListConfigServerUgly)
// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105
TEST_F(CmdLine, ModelListConfigServerPretty)
{
EXPECT_TRUE(listModels("https://staging-fuel.ignitionrobotics.org"));
EXPECT_TRUE(listModels("https://staging-fuel.gazebosim.org"));

EXPECT_NE(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org"),
"https://staging-fuel.gazebosim.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_NE(this->stdOutBuffer.str().find("owners"), std::string::npos)
<< this->stdOutBuffer.str();
Expand All @@ -119,7 +119,7 @@ TEST_F(CmdLine, ModelListConfigServerPretty)
EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_EQ(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos)
"https://staging-fuel.gazebosim.org/1.0/"), std::string::npos)
<< this->stdOutBuffer.str();
}

Expand All @@ -128,11 +128,11 @@ TEST_F(CmdLine, ModelListConfigServerPretty)
// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105
TEST_F(CmdLine, ModelListConfigServerPrettyOwner)
{
EXPECT_TRUE(listModels("https://staging-fuel.ignitionrobotics.org",
EXPECT_TRUE(listModels("https://staging-fuel.gazebosim.org",
"openrobotics"));

EXPECT_NE(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org"),
"https://staging-fuel.gazebosim.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_NE(this->stdOutBuffer.str().find("1 owners"), std::string::npos)
<< this->stdOutBuffer.str();
Expand All @@ -146,7 +146,7 @@ TEST_F(CmdLine, ModelListConfigServerPrettyOwner)
EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_EQ(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos)
"https://staging-fuel.gazebosim.org/1.0/"), std::string::npos)
<< this->stdOutBuffer.str();
}

Expand Down Expand Up @@ -255,10 +255,10 @@ TEST_F(CmdLine, WorldListFail)
TEST_F(CmdLine, WorldListConfigServerUgly)
{
EXPECT_TRUE(listWorlds(
"https://staging-fuel.ignitionrobotics.org", "", "true"));
"https://staging-fuel.gazebosim.org", "", "true"));

EXPECT_NE(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org"),
"https://staging-fuel.gazebosim.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_EQ(this->stdOutBuffer.str().find("owners"), std::string::npos)
<< this->stdOutBuffer.str();
Expand All @@ -269,10 +269,10 @@ TEST_F(CmdLine, WorldListConfigServerUgly)
// https://github.com/ignitionrobotics/ign-fuel-tools/issues/105
TEST_F(CmdLine, WorldListConfigServerPretty)
{
EXPECT_TRUE(listWorlds("https://staging-fuel.ignitionrobotics.org"));
EXPECT_TRUE(listWorlds("https://staging-fuel.gazebosim.org"));

EXPECT_NE(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org"), std::string::npos)
"https://staging-fuel.gazebosim.org"), std::string::npos)
<< this->stdOutBuffer.str();
EXPECT_NE(this->stdOutBuffer.str().find("owners"), std::string::npos)
<< this->stdOutBuffer.str();
Expand All @@ -282,18 +282,18 @@ TEST_F(CmdLine, WorldListConfigServerPretty)
EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_EQ(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos)
"https://staging-fuel.gazebosim.org/1.0/"), std::string::npos)
<< this->stdOutBuffer.str();
}

/////////////////////////////////////////////////
TEST_F(CmdLine, WorldListCustomServerPrettyOwner)
{
EXPECT_TRUE(listWorlds("https://staging-fuel.ignitionrobotics.org",
EXPECT_TRUE(listWorlds("https://staging-fuel.gazebosim.org",
"openrobotics"));

EXPECT_NE(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org"), std::string::npos)
"https://staging-fuel.gazebosim.org"), std::string::npos)
<< this->stdOutBuffer.str();
EXPECT_NE(this->stdOutBuffer.str().find("worlds"), std::string::npos)
<< this->stdOutBuffer.str();
Expand All @@ -305,7 +305,7 @@ TEST_F(CmdLine, WorldListCustomServerPrettyOwner)
EXPECT_EQ(this->stdOutBuffer.str().find("https://fuel.ignitionrobotics.org"),
std::string::npos) << this->stdOutBuffer.str();
EXPECT_EQ(this->stdOutBuffer.str().find(
"https://staging-fuel.ignitionrobotics.org/1.0/"), std::string::npos)
"https://staging-fuel.gazebosim.org/1.0/"), std::string::npos)
<< this->stdOutBuffer.str();
}

Expand Down

0 comments on commit 4edd502

Please sign in to comment.