From d6845073615160b6fb8ec2fa756df387f872858d Mon Sep 17 00:00:00 2001 From: Kevin Veen-Birkenbach Date: Tue, 24 Nov 2026 08:58:50 +0000 Subject: [PATCH] test(update): point the MCR paging fixture at a real repository MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit test-external test_urls_reachable checks every public URL in the tree and flagged the fake mcr.microsoft.com/v2/foo/bar tag URLs in test_docker.py with HTTP 404. The fixture now uses dotnet/runtime, whose tag list answers 200; the paging test itself is unchanged. 🎯 Fix: 95 % 💥 Break: 1 % 💸 Tokens: 100 % ⏱️ Velocity: 100 % 🛡️ Security: 100 % 🏆 Score: 94 🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 % Created-with: https://s.veen.world/skills Co-Authored-By: Claude Opus 5.5 --- tests/unit/python/utils/update/test_docker.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/unit/python/utils/update/test_docker.py b/tests/unit/python/utils/update/test_docker.py index c2906edf07..422b2b784e 100644 --- a/tests/unit/python/utils/update/test_docker.py +++ b/tests/unit/python/utils/update/test_docker.py @@ -118,8 +118,8 @@ nginx: self.assertEqual(read_text(str(config_path)), expected) -_MCR_TAGS = "https://mcr.microsoft.com/v2/foo/bar/tags/list?n=100" -_MCR_NEXT = "https://mcr.microsoft.com/v2/foo/bar/tags/list?last=a" +_MCR_TAGS = "https://mcr.microsoft.com/v2/dotnet/runtime/tags/list?n=100" +_MCR_NEXT = "https://mcr.microsoft.com/v2/dotnet/runtime/tags/list?last=a" class TestMcrPaging(unittest.TestCase): @@ -132,19 +132,19 @@ class TestMcrPaging(unittest.TestCase): page.headers = {"Link": header} pages.append(page) with mock.patch("urllib.request.urlopen", side_effect=pages) as opened: - tags = fetch_mcr_tags("mcr.microsoft.com/foo/bar") + tags = fetch_mcr_tags("mcr.microsoft.com/dotnet/runtime") return tags, [call.args[0].full_url for call in opened.call_args_list] def test_a_link_next_on_the_registry_pages(self) -> None: - for link in ("/v2/foo/bar/tags/list?last=a", _MCR_NEXT): + for link in ("/v2/dotnet/runtime/tags/list?last=a", _MCR_NEXT): with self.subTest(link=link): self.assertEqual(self._page(link), (["a", "b"], [_MCR_TAGS, _MCR_NEXT])) def test_a_link_next_off_the_registry_stops_paging(self) -> None: for link in ( - "https://evil.example/v2/foo/bar/tags/list?last=a", - "http://mcr.microsoft.com/v2/foo/bar/tags/list?last=a", - "//evil.example/v2/foo/bar/tags/list?last=a", + "https://evil.example/v2/dotnet/runtime/tags/list?last=a", + "http://mcr.microsoft.com/v2/dotnet/runtime/tags/list?last=a", + "//evil.example/v2/dotnet/runtime/tags/list?last=a", ): with self.subTest(link=link): self.assertEqual(self._page(link), (["a"], [_MCR_TAGS]))