Skip to content

Commit

Permalink
Remove fuel.ignitionrobotics.org from ClientConfig
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <[email protected]>
  • Loading branch information
Nate Koenig committed Aug 17, 2022
1 parent 424e96c commit b46b6a1
Show file tree
Hide file tree
Showing 6 changed files with 172 additions and 183 deletions.
7 changes: 0 additions & 7 deletions src/ClientConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ class gz::fuel_tools::ClientConfigPrivate
homePath, ".gz", "fuel");

this->servers.push_back(ServerConfig());

// Add in fuel.gazebosim.org as another default server config.
ServerConfig gzServerConfig;
gzServerConfig.SetUrl(
common::URI("https://fuel.ignitionrobotics.org"));
gzServerConfig.SetVersion("1.0");
this->servers.push_back(gzServerConfig);
}

/// \brief Clear values.
Expand Down
20 changes: 8 additions & 12 deletions src/ClientConfig_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::string cachePath()
TEST(ClientConfig, InitiallyDefaultServers)
{
ClientConfig config;
EXPECT_EQ(2u, config.Servers().size());
EXPECT_EQ(1u, config.Servers().size());
}

/////////////////////////////////////////////////
Expand All @@ -88,7 +88,7 @@ TEST(ClientConfig, ServersCanBeAdded)
srv.SetUrl(common::URI("http://asdf"));
config.AddServer(srv);

ASSERT_EQ(3u, config.Servers().size());
ASSERT_EQ(2u, config.Servers().size());
EXPECT_EQ(std::string("http://asdf"), config.Servers().back().Url().Str());
}

Expand All @@ -97,11 +97,9 @@ TEST(ClientConfig, ServersCanBeAdded)
TEST(ClientConfig, CustomDefaultConfiguration)
{
ClientConfig config;
ASSERT_EQ(2u, config.Servers().size());
ASSERT_EQ(1u, config.Servers().size());
EXPECT_EQ("https://fuel.gazebosim.org",
config.Servers().front().Url().Str());
EXPECT_EQ("https://fuel.ignitionrobotics.org",
config.Servers()[1].Url().Str());

std::string defaultCacheLocation = gz::common::joinPaths(
homePath(), ".gz", "fuel");
Expand Down Expand Up @@ -136,13 +134,11 @@ TEST(ClientConfig, CustomConfiguration)

EXPECT_TRUE(config.LoadConfig(testPath));

ASSERT_EQ(4u, config.Servers().size());
ASSERT_EQ(3u, config.Servers().size());
EXPECT_EQ("https://fuel.gazebosim.org",
config.Servers().front().Url().Str());
EXPECT_EQ("https://fuel.ignitionrobotics.org",
config.Servers()[1].Url().Str());
EXPECT_EQ("https://api.gazebosim.org",
config.Servers()[2].Url().Str());
config.Servers()[1].Url().Str());
EXPECT_EQ("https://myserver",
config.Servers().back().Url().Str());

Expand All @@ -166,10 +162,10 @@ TEST(ClientConfig, RepeatedServerConfiguration)
<< "# The list of servers." << std::endl
<< "servers:" << std::endl
<< " -" << std::endl
<< " url: https://fuel.ignitionrobotics.org" << std::endl
<< " url: https://fuel.gazebosim.org" << std::endl
<< "" << std::endl
<< " -" << std::endl
<< " url: https://fuel.ignitionrobotics.org" << std::endl
<< " url: https://fuel.gazebosim.org" << std::endl
<< "" << std::endl
<< "# Where are the assets stored in disk." << std::endl
<< "cache:" << std::endl
Expand Down Expand Up @@ -317,7 +313,7 @@ TEST(ClientConfig, AsString)
#else
EXPECT_NE(str.find(".gz\\fuel"), std::string::npos);
#endif
EXPECT_NE(str.find("https://fuel.ignitionrobotics.org"), std::string::npos);
EXPECT_NE(str.find("https://fuel.gazebosim.org"), std::string::npos);
}

{
Expand Down
Loading

0 comments on commit b46b6a1

Please sign in to comment.