summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-02-04 20:38:00 +0000
committerGerrit Code Review <review@openstack.org>2019-02-04 20:38:00 +0000
commit7fc7fdc9c82c5ef7163ea92b8b0336b1c498a415 (patch)
treee774adcc0e10895c50a722352481a71957e7f6e0
parente692bf530deee6d1fa8eb6c5b66579321903907c (diff)
parentf2ad0b38a41da8b993ceea435e41d4d347fc6c7f (diff)
Merge "Test coverage to exclude pipeline with untrusted project"
-rw-r--r--tests/fixtures/config/tenant-parser/git/org_project4/.zuul.yaml6
-rw-r--r--tests/fixtures/config/tenant-parser/override.yaml2
-rw-r--r--tests/unit/test_configloader.py2
3 files changed, 9 insertions, 1 deletions
diff --git a/tests/fixtures/config/tenant-parser/git/org_project4/.zuul.yaml b/tests/fixtures/config/tenant-parser/git/org_project4/.zuul.yaml
new file mode 100644
index 0000000..07a6c49
--- /dev/null
+++ b/tests/fixtures/config/tenant-parser/git/org_project4/.zuul.yaml
@@ -0,0 +1,6 @@
1- pipeline:
2 name: check
3 description: Example check pipeline
4 manager: independent
5 precedence: low
6 trigger: {}
diff --git a/tests/fixtures/config/tenant-parser/override.yaml b/tests/fixtures/config/tenant-parser/override.yaml
index 87674f1..e0eb7ae 100644
--- a/tests/fixtures/config/tenant-parser/override.yaml
+++ b/tests/fixtures/config/tenant-parser/override.yaml
@@ -9,3 +9,5 @@
9 exclude: project 9 exclude: project
10 - org/project2: 10 - org/project2:
11 include: job 11 include: job
12 - org/project4:
13 exclude: pipeline
diff --git a/tests/unit/test_configloader.py b/tests/unit/test_configloader.py
index 60cf2ab..bb7f987 100644
--- a/tests/unit/test_configloader.py
+++ b/tests/unit/test_configloader.py
@@ -80,7 +80,7 @@ class TestTenantOverride(TenantParserTestCase):
80 tenant = self.sched.abide.tenants.get('tenant-one') 80 tenant = self.sched.abide.tenants.get('tenant-one')
81 self.assertEqual(['common-config'], 81 self.assertEqual(['common-config'],
82 [x.name for x in tenant.config_projects]) 82 [x.name for x in tenant.config_projects])
83 self.assertEqual(['org/project1', 'org/project2'], 83 self.assertEqual(['org/project1', 'org/project2', 'org/project4'],
84 [x.name for x in tenant.untrusted_projects]) 84 [x.name for x in tenant.untrusted_projects])
85 project = tenant.config_projects[0] 85 project = tenant.config_projects[0]
86 tpc = tenant.project_configs[project.canonical_name] 86 tpc = tenant.project_configs[project.canonical_name]