summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authortanhengyeow <E0032242@u.nus.edu>2018-07-12 23:06:17 +0800
committertanhengyeow <E0032242@u.nus.edu>2018-07-13 22:56:12 +0800
commit9ab35beae88aa5031c629b1488d4a5d640a54448 (patch)
tree662a791567fa110cb01417ce2f659c479da8cce7 /tests
parent746a089d4a699857ebd0dff5b5a0a6e51a7949f1 (diff)
downloadpython-jenkins-job-builder-9ab35beae88aa5031c629b1488d4a5d640a54448.tar.gz
python-jenkins-job-builder-9ab35beae88aa5031c629b1488d4a5d640a54448.tar.xz
python-jenkins-job-builder-9ab35beae88aa5031c629b1488d4a5d640a54448.zip
Refactor clone_workspace function to use convert_mapping_to_xml
1. Refactored the code in the function to utilize convert_mapping_to_xml's way of detecting valid types. 2. Refactored optional parameters to use convert_mapping_to_xml Note: This update will affect users using lowercase inputs in their YAML files. An exception will be raised if the inputs doesn't follow the exact casing required by the plugin. Change-Id: I053ef5f58200e51b3f6ff5ec55760f9e6f095370
Diffstat (limited to 'tests')
-rw-r--r--tests/publishers/fixtures/clone-workspace001.xml1
-rw-r--r--tests/publishers/fixtures/clone-workspace002.xml2
-rw-r--r--tests/publishers/fixtures/clone-workspace002.yaml4
3 files changed, 4 insertions, 3 deletions
diff --git a/tests/publishers/fixtures/clone-workspace001.xml b/tests/publishers/fixtures/clone-workspace001.xml
index 92b14a53..2630a64b 100644
--- a/tests/publishers/fixtures/clone-workspace001.xml
+++ b/tests/publishers/fixtures/clone-workspace001.xml
@@ -6,6 +6,7 @@
<overrideDefaultExcludes>false</overrideDefaultExcludes>
<criteria>Any</criteria>
<archiveMethod>TAR</archiveMethod>
+ <workspaceExcludeGlob/>
</hudson.plugins.cloneworkspace.CloneWorkspacePublisher>
</publishers>
</project>
diff --git a/tests/publishers/fixtures/clone-workspace002.xml b/tests/publishers/fixtures/clone-workspace002.xml
index cce255e9..32a781ce 100644
--- a/tests/publishers/fixtures/clone-workspace002.xml
+++ b/tests/publishers/fixtures/clone-workspace002.xml
@@ -4,9 +4,9 @@
<hudson.plugins.cloneworkspace.CloneWorkspacePublisher plugin="clone-workspace-scm">
<workspaceGlob>**/*.zip</workspaceGlob>
<overrideDefaultExcludes>false</overrideDefaultExcludes>
- <workspaceExcludeGlob>**/*.tgz</workspaceExcludeGlob>
<criteria>Any</criteria>
<archiveMethod>TAR</archiveMethod>
+ <workspaceExcludeGlob>**/*.tgz</workspaceExcludeGlob>
</hudson.plugins.cloneworkspace.CloneWorkspacePublisher>
</publishers>
</project>
diff --git a/tests/publishers/fixtures/clone-workspace002.yaml b/tests/publishers/fixtures/clone-workspace002.yaml
index c7b0f477..f9fba56e 100644
--- a/tests/publishers/fixtures/clone-workspace002.yaml
+++ b/tests/publishers/fixtures/clone-workspace002.yaml
@@ -1,7 +1,7 @@
publishers:
- clone-workspace:
- criteria: "any"
- archive-method: "tar"
+ criteria: "Any"
+ archive-method: "TAR"
override-default-excludes: false
workspace-glob: "**/*.zip"
workspace-exclude-glob: "**/*.tgz"