diff options
author | Artem Nikitin <anikitin@networkoptix.com> | 2020-01-14 15:33:21 +0300 |
---|---|---|
committer | Artem Nikitin <anikitin@networkoptix.com> | 2020-01-17 09:55:59 +0300 |
commit | ad94757a4a8714b60ed1231ef58310b5a2246b30 (patch) | |
tree | 01889b5dd54cd071b6aff85aefcce8bc58975929 /tests | |
parent | 979770380151f99ec7b48d7d6fbd8d8d254c752c (diff) | |
download | python-jenkins-job-builder-ad94757a4a8714b60ed1231ef58310b5a2246b30.tar.gz python-jenkins-job-builder-ad94757a4a8714b60ed1231ef58310b5a2246b30.tar.xz python-jenkins-job-builder-ad94757a4a8714b60ed1231ef58310b5a2246b30.zip |
Fix authorization property issue
The change fixes a XML generating error (KeyError: '_use_folder_perms')
for project, which isn't contained in a folder and has got authorization
properties.
Task: 38110
Story: 2007087
Change-Id: I2e0ec6e524d07a935333b35e10eb4204af9256f7
Diffstat (limited to 'tests')
-rw-r--r-- | tests/yamlparser/fixtures/project-with-auth-properties.xml | 23 | ||||
-rw-r--r-- | tests/yamlparser/fixtures/project-with-auth-properties.yaml | 12 |
2 files changed, 35 insertions, 0 deletions
diff --git a/tests/yamlparser/fixtures/project-with-auth-properties.xml b/tests/yamlparser/fixtures/project-with-auth-properties.xml new file mode 100644 index 00000000..4d4c1dfb --- /dev/null +++ b/tests/yamlparser/fixtures/project-with-auth-properties.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.cloudbees.hudson.plugins.folder.Folder plugin="cloudbees-folder"> + <icon class="com.cloudbees.hudson.plugins.folder.icons.StockFolderIcon"/> + <views/> + <viewsTabBar class="hudson.views.DefaultViewsTabBar"/> + <primaryView>All</primaryView> + <healthMetrics/> + <actions/> + <description><!-- Managed by Jenkins Job Builder --></description> + <keepDependencies>false</keepDependencies> + <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> + <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> + <concurrentBuild>false</concurrentBuild> + <canRoam>true</canRoam> + <properties> + <hudson.security.AuthorizationMatrixProperty> + <permission>hudson.model.Item.Build:auser</permission> + </hudson.security.AuthorizationMatrixProperty> + </properties> + <scm class="hudson.scm.NullSCM"/> + <publishers/> + <buildWrappers/> +</com.cloudbees.hudson.plugins.folder.Folder> diff --git a/tests/yamlparser/fixtures/project-with-auth-properties.yaml b/tests/yamlparser/fixtures/project-with-auth-properties.yaml new file mode 100644 index 00000000..f761d8ce --- /dev/null +++ b/tests/yamlparser/fixtures/project-with-auth-properties.yaml @@ -0,0 +1,12 @@ +- property: + name: auth-prop-test + properties: + - authorization: + auser: + - job-build + +- job: + name: auth-job-test + project-type: folder + properties: + - auth-prop-test |