Cleanup approval requirement testing
On further inspection, trigger requirements will still be required
for parts of the kind of pipeline construction that we are using in
OpenStack; the idea that they could be completely replaced by
pipeline requirements is incorrect. To that end, un-deprecate
trigger requirements and cleanup the testing of both of them so that
each requirement is tested (relatively) independently. A small
amount of requirement composition is also tested, though all possible
combinations (a lot!) are not.
Move this testing into a new file for organizational purposes.
Also, support multiple vote values (eg, "+1" or "+2") when requiring
an approval.
Change-Id: I683c9a574ced0e27ced59e62b8059fef2dfd8b20
diff --git a/tests/fixtures/layout-requirement-vote1.yaml b/tests/fixtures/layout-requirement-vote1.yaml
new file mode 100644
index 0000000..7ccadff
--- /dev/null
+++ b/tests/fixtures/layout-requirement-vote1.yaml
@@ -0,0 +1,39 @@
+pipelines:
+ - name: pipeline
+ manager: IndependentPipelineManager
+ require:
+ approval:
+ - username: jenkins
+ verified: 1
+ trigger:
+ gerrit:
+ - event: comment-added
+ success:
+ gerrit:
+ verified: 1
+ failure:
+ gerrit:
+ verified: -1
+
+ - name: trigger
+ manager: IndependentPipelineManager
+ trigger:
+ gerrit:
+ - event: comment-added
+ require-approval:
+ - username: jenkins
+ verified: 1
+ success:
+ gerrit:
+ verified: 1
+ failure:
+ gerrit:
+ verified: -1
+
+projects:
+ - name: org/project1
+ pipeline:
+ - project1-pipeline
+ - name: org/project2
+ trigger:
+ - project2-trigger