Leave credentials out of the question for the human
CI / tests (pull_request) Failing after 3m38s

This commit is contained in:
2026-11-18 13:11:42 +01:00
parent 2776d1694d
commit 59e176743f
2 changed files with 15 additions and 2 deletions
+8
View File
@@ -131,6 +131,14 @@ class LocateTest(unittest.TestCase):
self.assertIn("is not an https, ssh or scp-style address", self.unsure(git))
self.assertEqual(git.cloned, [])
def test_leaves_the_credentials_of_an_origin_out_of_a_question(self) -> None:
self.configure()
self.origins[str(self.billing)] = "https://bot:s3cret@gitea.larvit.se/acme/billing"
self.origins[str(self.payments)] = "https://bot:s3cret@gitea.larvit.se/acme/payments"
asked = self.unsure(FakeGit(self.origins))
self.assertIn("https://gitea.larvit.se/acme/ledger is not an https", asked)
self.assertNotIn("s3cret", asked)
def test_fails_with_the_config_failure_where_a_config_cannot_be_read(self) -> None:
(self.projects / "broken").mkdir(parents=True)
(self.projects / "broken" / "config.toml").write_text("this is not toml", encoding="utf-8")