summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClark Boylan <clark.boylan@gmail.com>2014-08-21 15:14:14 -0700
committerClark Boylan <clark.boylan@gmail.com>2014-08-21 16:40:26 -0700
commit2da122a088877e226f219bd40b9e20276b85dbb3 (patch)
tree291c8a187b22047f70e2d900871df692f3e7994a
parent2532dd65c853b9874f9647f6f085a1a3808cb88b (diff)
downloadzuul-2da122a088877e226f219bd40b9e20276b85dbb3.tar.gz
Clean up bad layout files in zuul tests
Clean up the bad layout files in the zuul tests by removing a redundant file (bad_pipeline and bad_pipeline1.yaml were identical). Annotate the reason the layout is bad in each file. Finally remove a redundant swift section. Both bad switf sections were failing for the same reason, a missing name entry. Change-Id: I0fd09da1fb0ec7443fa7d12a3b31809546a01afd
-rw-r--r--tests/fixtures/layouts/bad_merge_failure.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines1
-rw-r--r--tests/fixtures/layouts/bad_pipelines1.yaml2
-rw-r--r--tests/fixtures/layouts/bad_pipelines10.yaml3
-rw-r--r--tests/fixtures/layouts/bad_pipelines2.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines3.yaml2
-rw-r--r--tests/fixtures/layouts/bad_pipelines4.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines5.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines6.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines7.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines8.yaml1
-rw-r--r--tests/fixtures/layouts/bad_pipelines9.yaml1
-rw-r--r--tests/fixtures/layouts/bad_projects1.yaml1
-rw-r--r--tests/fixtures/layouts/bad_projects2.yaml1
-rw-r--r--tests/fixtures/layouts/bad_swift.yaml3
-rw-r--r--tests/fixtures/layouts/bad_template1.yaml2
16 files changed, 17 insertions, 6 deletions
diff --git a/tests/fixtures/layouts/bad_merge_failure.yaml b/tests/fixtures/layouts/bad_merge_failure.yaml
index 313d23b8a..fc6854ead 100644
--- a/tests/fixtures/layouts/bad_merge_failure.yaml
+++ b/tests/fixtures/layouts/bad_merge_failure.yaml
@@ -10,6 +10,7 @@ pipelines:
failure:
gerrit:
verified: -1
+ # merge-failure-message needs a string.
merge-failure-message:
- name: gate
diff --git a/tests/fixtures/layouts/bad_pipelines b/tests/fixtures/layouts/bad_pipelines
deleted file mode 100644
index f62720869..000000000
--- a/tests/fixtures/layouts/bad_pipelines
+++ /dev/null
@@ -1 +0,0 @@
-pipelines:
diff --git a/tests/fixtures/layouts/bad_pipelines1.yaml b/tests/fixtures/layouts/bad_pipelines1.yaml
index da909333c..09638bc2e 100644
--- a/tests/fixtures/layouts/bad_pipelines1.yaml
+++ b/tests/fixtures/layouts/bad_pipelines1.yaml
@@ -1,2 +1,2 @@
+# Pipelines completely missing. At least one is required.
pipelines:
-
diff --git a/tests/fixtures/layouts/bad_pipelines10.yaml b/tests/fixtures/layouts/bad_pipelines10.yaml
index 5248c1772..ddde9469b 100644
--- a/tests/fixtures/layouts/bad_pipelines10.yaml
+++ b/tests/fixtures/layouts/bad_pipelines10.yaml
@@ -4,4 +4,5 @@ pipelines:
projects:
- name: foo
- merge-mode: foo \ No newline at end of file
+ # merge-mode must be one of merge, merge-resolve, cherry-pick.
+ merge-mode: foo
diff --git a/tests/fixtures/layouts/bad_pipelines2.yaml b/tests/fixtures/layouts/bad_pipelines2.yaml
index e75a5618f..fc1e1540f 100644
--- a/tests/fixtures/layouts/bad_pipelines2.yaml
+++ b/tests/fixtures/layouts/bad_pipelines2.yaml
@@ -1,4 +1,5 @@
pipelines:
+ # name is required for pipelines
- noname: check
manager: IndependentPipelineManager
diff --git a/tests/fixtures/layouts/bad_pipelines3.yaml b/tests/fixtures/layouts/bad_pipelines3.yaml
index 0c11a855c..93ac2662f 100644
--- a/tests/fixtures/layouts/bad_pipelines3.yaml
+++ b/tests/fixtures/layouts/bad_pipelines3.yaml
@@ -1,5 +1,7 @@
pipelines:
- name: check
+ # The manager must be one of IndependentPipelineManager
+ # or DependentPipelineManager
manager: NonexistentPipelineManager
projects:
diff --git a/tests/fixtures/layouts/bad_pipelines4.yaml b/tests/fixtures/layouts/bad_pipelines4.yaml
index 7f58024c9..3a91604eb 100644
--- a/tests/fixtures/layouts/bad_pipelines4.yaml
+++ b/tests/fixtures/layouts/bad_pipelines4.yaml
@@ -3,6 +3,7 @@ pipelines:
manager: IndependentPipelineManager
trigger:
gerrit:
+ # non-event is not a valid gerrit event
- event: non-event
projects:
diff --git a/tests/fixtures/layouts/bad_pipelines5.yaml b/tests/fixtures/layouts/bad_pipelines5.yaml
index 929c1a94f..f95a78ed4 100644
--- a/tests/fixtures/layouts/bad_pipelines5.yaml
+++ b/tests/fixtures/layouts/bad_pipelines5.yaml
@@ -3,6 +3,7 @@ pipelines:
manager: IndependentPipelineManager
trigger:
gerrit:
+ # event is a required item but it is missing.
- approval:
- approved: 1
diff --git a/tests/fixtures/layouts/bad_pipelines6.yaml b/tests/fixtures/layouts/bad_pipelines6.yaml
index 6dcdaf351..aa91c772f 100644
--- a/tests/fixtures/layouts/bad_pipelines6.yaml
+++ b/tests/fixtures/layouts/bad_pipelines6.yaml
@@ -4,6 +4,7 @@ pipelines:
trigger:
gerrit:
- event: comment-added
+ # approved is not a valid entry. Should be approval.
approved: 1
projects:
diff --git a/tests/fixtures/layouts/bad_pipelines7.yaml b/tests/fixtures/layouts/bad_pipelines7.yaml
index 7517b9ac8..e2db49577 100644
--- a/tests/fixtures/layouts/bad_pipelines7.yaml
+++ b/tests/fixtures/layouts/bad_pipelines7.yaml
@@ -1,4 +1,5 @@
pipelines:
+ # The pipeline must have a name.
- manager: IndependentPipelineManager
projects:
diff --git a/tests/fixtures/layouts/bad_pipelines8.yaml b/tests/fixtures/layouts/bad_pipelines8.yaml
index eeab0380b..9c5918ec9 100644
--- a/tests/fixtures/layouts/bad_pipelines8.yaml
+++ b/tests/fixtures/layouts/bad_pipelines8.yaml
@@ -1,4 +1,5 @@
pipelines:
+ # The pipeline must have a manager
- name: check
projects:
diff --git a/tests/fixtures/layouts/bad_pipelines9.yaml b/tests/fixtures/layouts/bad_pipelines9.yaml
index ebb2e1fff..89307d532 100644
--- a/tests/fixtures/layouts/bad_pipelines9.yaml
+++ b/tests/fixtures/layouts/bad_pipelines9.yaml
@@ -1,4 +1,5 @@
pipelines:
+ # Names must be unique.
- name: check
manager: IndependentPipelineManager
- name: check
diff --git a/tests/fixtures/layouts/bad_projects1.yaml b/tests/fixtures/layouts/bad_projects1.yaml
index c210c43e0..e3d381fb4 100644
--- a/tests/fixtures/layouts/bad_projects1.yaml
+++ b/tests/fixtures/layouts/bad_projects1.yaml
@@ -4,6 +4,7 @@ pipelines:
projects:
- name: foo
+ # gate pipeline is not defined.
gate:
- test
diff --git a/tests/fixtures/layouts/bad_projects2.yaml b/tests/fixtures/layouts/bad_projects2.yaml
index b91ed9dfe..9291cc9dc 100644
--- a/tests/fixtures/layouts/bad_projects2.yaml
+++ b/tests/fixtures/layouts/bad_projects2.yaml
@@ -5,5 +5,6 @@ pipelines:
projects:
- name: foo
check:
+ # Indentation is one level too deep on the last line.
- test
- foo
diff --git a/tests/fixtures/layouts/bad_swift.yaml b/tests/fixtures/layouts/bad_swift.yaml
index d8a8c3fb3..e79dca6f6 100644
--- a/tests/fixtures/layouts/bad_swift.yaml
+++ b/tests/fixtures/layouts/bad_swift.yaml
@@ -16,11 +16,10 @@ jobs:
swift:
- name: logs
- name: ^.*-merge$
+ # swift requires a name
swift:
container: merge_assets
failure-message: Unable to merge change
- - name: test-test
- swift:
projects:
- name: test-org/test
diff --git a/tests/fixtures/layouts/bad_template1.yaml b/tests/fixtures/layouts/bad_template1.yaml
index 15822d11c..cab17a12b 100644
--- a/tests/fixtures/layouts/bad_template1.yaml
+++ b/tests/fixtures/layouts/bad_template1.yaml
@@ -10,7 +10,7 @@ pipelines:
project-templates:
- name: template-generic
check:
- # Template uses the 'project' parameter' which must
+ # Template uses the 'project' parameter' which must be provided
- '{project}-merge'
projects: