Add more testing for pass-to-parent
Also test that an untrusted job with secrets that are passed to parent becomes marked post-review. Change-Id: If3691163f0804ebb8cc3148a5e51c56c9d2ad845
This commit is contained in:
parent
91ed6652dc
commit
a3a8a71756
|
@ -58,6 +58,11 @@
|
|||
files: override.txt
|
||||
|
||||
- project:
|
||||
check:
|
||||
jobs:
|
||||
- no-pass
|
||||
- pass
|
||||
- override
|
||||
gate:
|
||||
jobs:
|
||||
- no-pass
|
||||
|
|
|
@ -3846,6 +3846,15 @@ class TestSecretPassToParent(ZuulTestCase):
|
|||
[{'parent_secret': {'password': 'password3'},
|
||||
'secret': {'password': 'password1'}}])
|
||||
|
||||
B = self.fake_gerrit.addFakeChange('org/project', 'master', 'B',
|
||||
files=file_dict)
|
||||
self.fake_gerrit.addEvent(B.getPatchsetCreatedEvent(1))
|
||||
self.waitUntilSettled()
|
||||
self.assertHistory([
|
||||
dict(name='pass', result='SUCCESS', changes='1,1'),
|
||||
])
|
||||
self.assertIn('does not allow post-review', B.messages[0])
|
||||
|
||||
def test_secret_override(self):
|
||||
# Test that secrets passed to parents don't override existing
|
||||
# secrets.
|
||||
|
|
Loading…
Reference in New Issue