Harden pre-production deployment with external environment and preflights
This commit is contained in:
@@ -73,3 +73,8 @@ class PushPreflightTests(unittest.TestCase):
|
||||
with self.subTest(target=target), patch(target, side_effect=ValueError('sensitive SDK details')):
|
||||
with self.assertRaisesRegex(push_preflight.PreflightError, '^credential_missing_unreadable_or_invalid$'):
|
||||
push_preflight.check(self.account)
|
||||
|
||||
def test_missing_credential_fails_without_disclosing_path_or_sdk_details(self):
|
||||
with patch('push_preflight.Path.stat', side_effect=FileNotFoundError('private filename')):
|
||||
with self.assertRaisesRegex(push_preflight.PreflightError, '^credential_missing_unreadable_or_invalid$'):
|
||||
push_preflight.check(self.account)
|
||||
|
||||
Reference in New Issue
Block a user