Strip credentials up to the last @ before the path
CI / tests (pull_request) Failing after 3m42s

This commit is contained in:
2026-11-18 13:24:50 +01:00
parent 9bdf861087
commit db0c5d4ec8
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -137,11 +137,11 @@ class LocateTest(unittest.TestCase):
def test_clones_and_asks_without_the_credentials_an_origin_holds(self) -> None:
self.configure()
self.origins[str(self.billing)] = "https://bot:s3cret@gitea.larvit.se/acme/billing"
self.origins[str(self.payments)] = "https://other:t0ken@gitea.larvit.se/acme/payments.git"
self.origins[str(self.payments)] = "https://other:t0@ken@gitea.larvit.se/acme/payments.git"
git = FakeGit(self.origins)
self.assertIsInstance(self.locate(git), Located)
self.assertEqual(git.cloned, [("https://gitea.larvit.se/acme/ledger", str(self.home / "code" / "ledger"))])
self.origins[str(self.payments)] = "https://other:t0ken@gitea.larvit.se/acme/payments"
self.origins[str(self.payments)] = "https://other:t0@ken@gitea.larvit.se/acme/payments"
self.origins[str(self.billing)] = "https://bot:s3cret@gitea.larvit.se"
self.assertNotIn("s3cret", self.unsure(FakeGit(self.origins), "stock"))