From c3fc425871149b12a1d12153bed90a06a3d20132 Mon Sep 17 00:00:00 2001 From: Daniel Date: Wed, 11 Aug 2021 16:11:58 +0200 Subject: [PATCH] Remove conan-center default remote (#9401) * Remove conan-center default remote * fix tests --- conans/client/cache/remote_registry.py | 2 -- .../configuration/registry_test.py | 24 +++++-------------- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/conans/client/cache/remote_registry.py b/conans/client/cache/remote_registry.py index 71706374584..83475e1ef68 100644 --- a/conans/client/cache/remote_registry.py +++ b/conans/client/cache/remote_registry.py @@ -112,8 +112,6 @@ def defaults(cls): result = Remotes() result._remotes[CONAN_CENTER_REMOTE_NAME] = Remote(CONAN_CENTER_REMOTE_NAME, "https://center.conan.io", True, False) - result._remotes["conan-center"] = Remote("conan-center", "https://conan.bintray.com", True, - False) return result def select(self, remote_name): diff --git a/conans/test/integration/configuration/registry_test.py b/conans/test/integration/configuration/registry_test.py index 75a291a4b5c..a65496934f5 100644 --- a/conans/test/integration/configuration/registry_test.py +++ b/conans/test/integration/configuration/registry_test.py @@ -67,13 +67,11 @@ def test_add_remove_update(self): registry.add("local", "http://localhost:9300") self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, False)]) # Add registry.add("new", "new_url", False) self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, False), ("new", "new_url", False, False)]) with self.assertRaises(ConanException): @@ -82,7 +80,6 @@ def test_add_remove_update(self): registry.update("new", "other_url") self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, False), ("new", "other_url", True, False)]) with self.assertRaises(ConanException): @@ -91,7 +88,6 @@ def test_add_remove_update(self): registry.update("new", "other_url", False) self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, False), ("new", "other_url", False, False)]) @@ -99,7 +95,6 @@ def test_add_remove_update(self): registry.remove("local") self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("new", "other_url", False, False)]) with self.assertRaises(ConanException): registry.remove("new2") @@ -145,15 +140,13 @@ def test_remote_none(self): registry.add("foobar", None) self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("foobar", None, True, False)]) self.assertIn("WARN: The URL is empty. It must contain scheme and hostname.", cache._output) registry.remove("foobar") - registry.update("conan-center", None) + registry.update("conancenter", None) self.assertEqual(list(registry.load_remotes().values()), - [("conancenter", "https://center.conan.io", True, False), - ("conan-center", None, True, False)]) + [("conancenter", None, True, False)]) self.assertIn("WARN: The URL is empty. It must contain scheme and hostname.", cache._output) def test_enable_disable_remotes(self): @@ -166,26 +159,21 @@ def test_enable_disable_remotes(self): registry.set_disabled_state("local", True) self.assertEqual(list(registry.load_remotes().all_values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, True)]) self.assertEqual(list(registry.load_remotes().values()), - [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False)]) + [("conancenter", "https://center.conan.io", True, False)]) - registry.set_disabled_state("conan-center", True) + registry.set_disabled_state("conancenter", True) self.assertEqual(list(registry.load_remotes().all_values()), - [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, True), + [("conancenter", "https://center.conan.io", True, True), ("local", "http://localhost:9300", True, True)]) - self.assertEqual(list(registry.load_remotes().values()), - [("conancenter", "https://center.conan.io", True, False)]) + self.assertEqual(list(registry.load_remotes().values()), []) registry.set_disabled_state("*", False) self.assertEqual(list(registry.load_remotes().values()), [("conancenter", "https://center.conan.io", True, False), - ("conan-center", "https://conan.bintray.com", True, False), ("local", "http://localhost:9300", True, False)]) registry.set_disabled_state("*", True)