test(update): point the MCR paging fixture at a real repository

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 <noreply@anthropic.com>
This commit is contained in:
kevinveenbirkenbachandClaude Opus 5.5 committed 2026-11-24 08:58:50 +00:00
1 parent 10dca22b52
commit d684507361
1 file changed
+7 -7
@@ -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]))