summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDarragh Bailey <daragh.bailey@gmail.com>2015-11-14 19:42:04 +0000
committerDarragh Bailey <daragh.bailey@gmail.com>2015-12-12 19:01:10 +0000
commita796a593dc1a725b60fb08ca315c32b3f2432cc6 (patch)
tree50e29b5042cebd76de330c78d472603b714f729c
parent15e06f95869cb9ae3a7361a88a4ca10155b4d221 (diff)
Standardize docstrings for properties module
Move remaining examples to unit tests, remove unnecessary '\' and align docstrings to the predominate standard throughout the project. Fix broken authenticated-build highlighted by the added unit test. Change-Id: Ic9700f587073946be17be543920a4a3ed7cd19d0
Notes
Notes (review): Code-Review+2: Thanh Ha <zxiiro@gmail.com> Code-Review+1: Dong Ma <winterma.dong@gmail.com> Code-Review+2: Wayne Warren <waynr+launchpad@sdf.org> Workflow+1: Wayne Warren <waynr+launchpad@sdf.org> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 11 Jan 2016 16:48:17 +0000 Reviewed-on: https://review.openstack.org/245446 Project: openstack-infra/jenkins-job-builder Branch: refs/heads/master
-rw-r--r--jenkins_jobs/modules/properties.py197
-rw-r--r--tests/properties/fixtures/authenticated_build.xml8
-rw-r--r--tests/properties/fixtures/authenticated_build.yaml2
-rw-r--r--tests/properties/fixtures/authorization_matrix.xml20
-rw-r--r--tests/properties/fixtures/authorization_matrix.yaml17
-rw-r--r--tests/properties/fixtures/github.xml8
-rw-r--r--tests/properties/fixtures/github.yaml3
-rw-r--r--tests/properties/fixtures/priority_sorter.xml8
-rw-r--r--tests/properties/fixtures/priority_sorter.yaml3
-rw-r--r--tests/properties/fixtures/promoted_build.xml11
-rw-r--r--tests/properties/fixtures/promoted_build.yaml5
-rw-r--r--tests/properties/fixtures/throttle001.xml4
-rw-r--r--tests/properties/fixtures/throttle001.yaml2
-rw-r--r--tests/properties/fixtures/throttle002.xml16
-rw-r--r--tests/properties/fixtures/throttle002.yaml6
15 files changed, 203 insertions, 107 deletions
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index fc36775..dd3c713 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -45,13 +45,14 @@ def builds_chain_fingerprinter(parser, xml_parent, data):
45 <Builds+chain+fingerprinter>`. 45 <Builds+chain+fingerprinter>`.
46 46
47 :arg bool per-builds-chain: enable builds hierarchy fingerprinting 47 :arg bool per-builds-chain: enable builds hierarchy fingerprinting
48 (default False) 48 (default false)
49 :arg bool per-job-chain: enable jobs hierarchy fingerprinting 49 :arg bool per-job-chain: enable jobs hierarchy fingerprinting
50 (default False) 50 (default false)
51 51
52 Example: 52 Example:
53 53
54 .. literalinclude:: /../../tests/properties/fixtures/fingerprinter.yaml 54 .. literalinclude:: /../../tests/properties/fixtures/fingerprinter.yaml
55 :language: yaml
55 """ 56 """
56 fingerprinter = XML.SubElement(xml_parent, 57 fingerprinter = XML.SubElement(xml_parent,
57 'org.jenkinsci.plugins.' 58 'org.jenkinsci.plugins.'
@@ -75,11 +76,11 @@ def ownership(parser, xml_parent, data):
75 Example: 76 Example:
76 77
77 .. literalinclude:: /../../tests/properties/fixtures/ownership.yaml 78 .. literalinclude:: /../../tests/properties/fixtures/ownership.yaml
79 :language: yaml
78 """ 80 """
79 ownership_plugin = \ 81 ownership_plugin = XML.SubElement(
80 XML.SubElement(xml_parent, 82 xml_parent,
81 'com.synopsys.arc.' 83 'com.synopsys.arc.jenkins.plugins.ownership.jobs.JobOwnerJobProperty')
82 'jenkins.plugins.ownership.jobs.JobOwnerJobProperty')
83 ownership = XML.SubElement(ownership_plugin, 'ownership') 84 ownership = XML.SubElement(ownership_plugin, 'ownership')
84 owner = str(data.get('enabled', True)).lower() 85 owner = str(data.get('enabled', True)).lower()
85 XML.SubElement(ownership, 'ownershipEnabled').text = owner 86 XML.SubElement(ownership, 'ownershipEnabled').text = owner
@@ -100,15 +101,12 @@ def promoted_build(parser, xml_parent, data):
100 Requires the Jenkins :jenkins-wiki:`Promoted Builds Plugin 101 Requires the Jenkins :jenkins-wiki:`Promoted Builds Plugin
101 <Promoted+Builds+Plugin>`. 102 <Promoted+Builds+Plugin>`.
102 103
103 :arg list names: the promoted build names 104 :arg list names: the promoted build names (optional)
104 105
105 Example:: 106 Example:
106 107
107 properties: 108 .. literalinclude:: /../../tests/properties/fixtures/promoted_build.yaml
108 - promoted-build: 109 :language: yaml
109 names:
110 - "Release to QA"
111 - "Jane Must Approve"
112 """ 110 """
113 promoted = XML.SubElement(xml_parent, 'hudson.plugins.promoted__builds.' 111 promoted = XML.SubElement(xml_parent, 'hudson.plugins.promoted__builds.'
114 'JobPropertyImpl') 112 'JobPropertyImpl')
@@ -123,13 +121,12 @@ def github(parser, xml_parent, data):
123 """yaml: github 121 """yaml: github
124 Sets the GitHub URL for the project. 122 Sets the GitHub URL for the project.
125 123
126 :arg str url: the GitHub URL 124 :arg str url: the GitHub URL (required)
127 125
128 Example:: 126 Example:
129 127
130 properties: 128 .. literalinclude:: /../../tests/properties/fixtures/github.yaml
131 - github: 129 :language: yaml
132 url: https://github.com/openstack-infra/jenkins-job-builder/
133 """ 130 """
134 github = XML.SubElement(xml_parent, 131 github = XML.SubElement(xml_parent,
135 'com.coravy.hudson.plugins.github.' 132 'com.coravy.hudson.plugins.github.'
@@ -143,11 +140,12 @@ def least_load(parser, xml_parent, data):
143 Enables the Least Load Plugin. 140 Enables the Least Load Plugin.
144 Requires the Jenkins :jenkins-wiki:`Least Load Plugin <Least+Load+Plugin>`. 141 Requires the Jenkins :jenkins-wiki:`Least Load Plugin <Least+Load+Plugin>`.
145 142
146 :arg bool disabled: whether or not leastload is disabled (default True) 143 :arg bool disabled: whether or not leastload is disabled (default true)
147 144
148 Example: 145 Example:
149 146
150 .. literalinclude:: /../../tests/properties/fixtures/least-load002.yaml 147 .. literalinclude:: /../../tests/properties/fixtures/least-load002.yaml
148 :language: yaml
151 """ 149 """
152 least = XML.SubElement(xml_parent, 150 least = XML.SubElement(xml_parent,
153 'org.bstick12.jenkinsci.plugins.leastload.' 151 'org.bstick12.jenkinsci.plugins.leastload.'
@@ -165,19 +163,14 @@ def throttle(parser, xml_parent, data):
165 163
166 :arg int max-per-node: max concurrent builds per node (default 0) 164 :arg int max-per-node: max concurrent builds per node (default 0)
167 :arg int max-total: max concurrent builds (default 0) 165 :arg int max-total: max concurrent builds (default 0)
168 :arg bool enabled: whether throttling is enabled (default True) 166 :arg bool enabled: whether throttling is enabled (default true)
169 :arg str option: throttle `project` or `category` 167 :arg str option: throttle `project` or `category`
170 :arg list categories: multiproject throttle categories 168 :arg list categories: multiproject throttle categories
171 169
172 Example:: 170 Example:
173
174 properties:
175 - throttle:
176 max-total: 4
177 categories:
178 - cat1
179 - cat2
180 171
172 .. literalinclude:: /../../tests/properties/fixtures/throttle001.yaml
173 :language: yaml
181 """ 174 """
182 throttle = XML.SubElement(xml_parent, 175 throttle = XML.SubElement(xml_parent,
183 'hudson.plugins.throttleconcurrents.' 176 'hudson.plugins.throttleconcurrents.'
@@ -215,6 +208,7 @@ def sidebar(parser, xml_parent, data):
215 Example: 208 Example:
216 209
217 .. literalinclude:: /../../tests/properties/fixtures/sidebar02.yaml 210 .. literalinclude:: /../../tests/properties/fixtures/sidebar02.yaml
211 :language: yaml
218 """ 212 """
219 sidebar = xml_parent.find('hudson.plugins.sidebar__link.ProjectLinks') 213 sidebar = xml_parent.find('hudson.plugins.sidebar__link.ProjectLinks')
220 if sidebar is None: 214 if sidebar is None:
@@ -284,58 +278,49 @@ def authenticated_build(parser, xml_parent, data):
284 Specifies an authorization matrix where only authenticated users 278 Specifies an authorization matrix where only authenticated users
285 may trigger a build. 279 may trigger a build.
286 280
287 DEPRECATED 281 .. deprecated:: 0.1.0. Please use :ref:`authorization <authorization>`.
282
283 Example:
288 284
289 Example:: 285 .. literalinclude::
286 /../../tests/properties/fixtures/authenticated_build.yaml
287 :language: yaml
290 288
291 properties:
292 - authenticated-build
293 """ 289 """
294 # TODO: generalize this 290 # TODO: generalize this
295 if data: 291 security = XML.SubElement(xml_parent,
296 security = XML.SubElement(xml_parent, 292 'hudson.security.'
297 'hudson.security.' 293 'AuthorizationMatrixProperty')
298 'AuthorizationMatrixProperty') 294 XML.SubElement(security, 'permission').text = (
299 XML.SubElement(security, 'permission').text = \ 295 'hudson.model.Item.Build:authenticated')
300 'hudson.model.Item.Build:authenticated'
301 296
302 297
303def authorization(parser, xml_parent, data): 298def authorization(parser, xml_parent, data):
304 """yaml: authorization 299 """yaml: authorization
305 Specifies an authorization matrix 300 Specifies an authorization matrix
306 301
307 The available rights are: 302 :arg list <name>: `<name>` is the name of the group or user, containing
308 job-delete 303 the list of rights to grant.
309 job-configure 304
310 job-read 305 :<name> rights:
311 job-extended-read 306 * **job-delete**
312 job-discover 307 * **job-configure**
313 job-build 308 * **job-read**
314 job-workspace 309 * **job-extended-read**
315 job-cancel 310 * **job-discover**
316 run-delete 311 * **job-build**
317 run-update 312 * **job-workspace**
318 scm-tag 313 * **job-cancel**
319 314 * **run-delete**
320 Example:: 315 * **run-update**
321 316 * **scm-tag**
322 properties: 317
323 - authorization: 318 Example:
324 admin: 319
325 - job-delete 320 .. literalinclude::
326 - job-configure 321 /../../tests/properties/fixtures/authorization_matrix.yaml
327 - job-read 322 :language: yaml
328 - job-discover 323
329 - job-build
330 - job-workspace
331 - job-cancel
332 - run-delete
333 - run-update
334 - scm-tag
335 anonymous:
336 - job-discover
337 - job-read
338 - job-extended-read
339 """ 324 """
340 325
341 mapping = { 326 mapping = {
@@ -388,11 +373,10 @@ def priority_sorter(parser, xml_parent, data):
388 :arg int priority: Priority of the job. Higher value means higher 373 :arg int priority: Priority of the job. Higher value means higher
389 priority, with 100 as the standard priority. (required) 374 priority, with 100 as the standard priority. (required)
390 375
391 Example:: 376 Example:
392 377
393 properties: 378 .. literalinclude:: /../../tests/properties/fixtures/priority_sorter.yaml
394 - priority-sorter: 379 :language: yaml
395 priority: 150
396 """ 380 """
397 priority_sorter_tag = XML.SubElement(xml_parent, 381 priority_sorter_tag = XML.SubElement(xml_parent,
398 'hudson.queueSorter.' 382 'hudson.queueSorter.'
@@ -410,22 +394,19 @@ def build_blocker(parser, xml_parent, data):
410 Requires the Jenkins :jenkins-wiki:`Build Blocker Plugin 394 Requires the Jenkins :jenkins-wiki:`Build Blocker Plugin
411 <Build+Blocker+Plugin>`. 395 <Build+Blocker+Plugin>`.
412 396
413 :arg bool use-build-blocker: Enable or disable build blocker 397 :arg bool use-build-blocker: Enable or disable build blocker (default true)
414 (default true) 398 :arg list blocking-jobs: One regular expression per line to select
415 :arg list blocking-jobs: One regular expression per line 399 blocking jobs by their names. (required)
416 to select blocking jobs by their names. (required)
417
418 :arg str block-level: block build globally ('GLOBAL') or per node ('NODE') 400 :arg str block-level: block build globally ('GLOBAL') or per node ('NODE')
419 (default 'GLOBAL') 401 (default 'GLOBAL')
420
421 :arg str queue-scanning: scan build queue for all builds ('ALL') or only 402 :arg str queue-scanning: scan build queue for all builds ('ALL') or only
422 buildable builds ('BUILDABLE') (default 'DISABLED')) 403 buildable builds ('BUILDABLE') (default 'DISABLED'))
423 404
424
425 Example: 405 Example:
426 406
427 .. literalinclude:: \ 407 .. literalinclude::
428 /../../tests/properties/fixtures/build-blocker01.yaml 408 /../../tests/properties/fixtures/build-blocker01.yaml
409 :language: yaml
429 """ 410 """
430 blocker = XML.SubElement(xml_parent, 411 blocker = XML.SubElement(xml_parent,
431 'hudson.plugins.' 412 'hudson.plugins.'
@@ -466,14 +447,14 @@ def copyartifact(parser, xml_parent, data):
466 Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin 447 Requires the Jenkins :jenkins-wiki:`Copy Artifact plugin
467 <Copy+Artifact+Plugin>`. 448 <Copy+Artifact+Plugin>`.
468 449
469 :arg string projects: comma separated list of projects that can copy 450 :arg str projects: comma separated list of projects that can copy
470 artifacts of this project. Wild card character '*' is available. 451 artifacts of this project. Wild card character '*' is available.
471 452
472
473 Example: 453 Example:
474 454
475 .. literalinclude:: \ 455 .. literalinclude::
476 /../../tests/properties/fixtures/copyartifact.yaml 456 /../../tests/properties/fixtures/copyartifact.yaml
457 :language: yaml
477 458
478 """ 459 """
479 copyartifact = XML.SubElement(xml_parent, 460 copyartifact = XML.SubElement(xml_parent,
@@ -503,12 +484,14 @@ def batch_tasks(parser, xml_parent, data):
503 484
504 :arg list batch-tasks: Batch tasks. 485 :arg list batch-tasks: Batch tasks.
505 486
506 :Task: * **name** (`str`) Task name. 487 :Tasks:
507 * **script** (`str`) Task script. 488 * **name** (`str`) Task name.
489 * **script** (`str`) Task script.
508 490
509 Example: 491 Example:
510 492
511 .. literalinclude:: /../../tests/properties/fixtures/batch-task.yaml 493 .. literalinclude:: /../../tests/properties/fixtures/batch-task.yaml
494 :language: yaml
512 495
513 """ 496 """
514 pdef = XML.SubElement(xml_parent, 497 pdef = XML.SubElement(xml_parent,
@@ -531,10 +514,10 @@ def heavy_job(parser, xml_parent, data):
531 :arg int weight: Specify the total number of executors 514 :arg int weight: Specify the total number of executors
532 that this job should occupy (default 1) 515 that this job should occupy (default 1)
533 516
534
535 Example: 517 Example:
536 518
537 .. literalinclude:: /../../tests/properties/fixtures/heavy-job.yaml 519 .. literalinclude:: /../../tests/properties/fixtures/heavy-job.yaml
520 :language: yaml
538 521
539 """ 522 """
540 heavyjob = XML.SubElement(xml_parent, 523 heavyjob = XML.SubElement(xml_parent,
@@ -553,15 +536,16 @@ def slave_utilization(parser, xml_parent, data):
553 <Slave+Utilization+Plugin>`. 536 <Slave+Utilization+Plugin>`.
554 537
555 :arg int slave-percentage: Specify the percentage of a slave's execution 538 :arg int slave-percentage: Specify the percentage of a slave's execution
556 slots that this job should occupy (default: 0) 539 slots that this job should occupy (default 0)
557 :arg bool single-instance-per-slave: Control whether concurrent instances 540 :arg bool single-instance-per-slave: Control whether concurrent instances
558 of this job will be permitted to run in parallel on a single slave 541 of this job will be permitted to run in parallel on a single slave
559 (default: False) 542 (default false)
560 543
561 Example: 544 Example:
562 545
563 .. literalinclude:: \ 546 .. literalinclude::
564 /../../tests/properties/fixtures/slave-utilization1.yaml 547 /../../tests/properties/fixtures/slave-utilization1.yaml
548 :language: yaml
565 """ 549 """
566 utilization = XML.SubElement( 550 utilization = XML.SubElement(
567 xml_parent, 'com.suryagaddipati.jenkins.SlaveUtilizationProperty') 551 xml_parent, 'com.suryagaddipati.jenkins.SlaveUtilizationProperty')
@@ -579,15 +563,16 @@ def delivery_pipeline(parser, xml_parent, data):
579 Requires the Jenkins :jenkins-wiki:`Delivery Pipeline Plugin 563 Requires the Jenkins :jenkins-wiki:`Delivery Pipeline Plugin
580 <Delivery+Pipeline+Plugin>`. 564 <Delivery+Pipeline+Plugin>`.
581 565
566 :arg str stage: Name of the stage for this job (default '')
567 :arg str task: Name of the task for this job (default '')
582 :arg str description: task description template for this job 568 :arg str description: task description template for this job
583 (default: '') 569 (default '')
584 :arg str stage: Name of the stage for this job (default: '')
585 :arg str task: Name of the task for this job (default: '')
586 570
587 Example: 571 Example:
588 572
589 .. literalinclude:: \ 573 .. literalinclude::
590 /../../tests/properties/fixtures/delivery-pipeline1.yaml 574 /../../tests/properties/fixtures/delivery-pipeline1.yaml
575 :language: yaml
591 576
592 """ 577 """
593 pipeline = XML.SubElement(xml_parent, 578 pipeline = XML.SubElement(xml_parent,
@@ -609,8 +594,9 @@ def zeromq_event(parser, xml_parent, data):
609 594
610 Example: 595 Example:
611 596
612 .. literalinclude:: \ 597 .. literalinclude::
613 /../../tests/properties/fixtures/zeromq-event.yaml 598 /../../tests/properties/fixtures/zeromq-event.yaml
599 :language: yaml
614 600
615 """ 601 """
616 602
@@ -626,14 +612,15 @@ def rebuild(parser, xml_parent, data):
626 <Rebuild+Plugin>`. 612 <Rebuild+Plugin>`.
627 613
628 :arg bool auto-rebuild: Rebuild without asking for parameters 614 :arg bool auto-rebuild: Rebuild without asking for parameters
629 (default: False) 615 (default false)
630 :arg bool rebuild-disabled: Disable rebuilding for this job 616 :arg bool rebuild-disabled: Disable rebuilding for this job
631 (default: False) 617 (default false)
632 618
633 Example: 619 Example:
634 620
635 .. literalinclude:: \ 621 .. literalinclude::
636 /../../tests/properties/fixtures/rebuild.yaml 622 /../../tests/properties/fixtures/rebuild.yaml
623 :language: yaml
637 """ 624 """
638 sub_element = XML.SubElement(xml_parent, 625 sub_element = XML.SubElement(xml_parent,
639 'com.sonyericsson.rebuild.RebuildSettings') 626 'com.sonyericsson.rebuild.RebuildSettings')
diff --git a/tests/properties/fixtures/authenticated_build.xml b/tests/properties/fixtures/authenticated_build.xml
new file mode 100644
index 0000000..27b396c
--- /dev/null
+++ b/tests/properties/fixtures/authenticated_build.xml
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <hudson.security.AuthorizationMatrixProperty>
5 <permission>hudson.model.Item.Build:authenticated</permission>
6 </hudson.security.AuthorizationMatrixProperty>
7 </properties>
8</project>
diff --git a/tests/properties/fixtures/authenticated_build.yaml b/tests/properties/fixtures/authenticated_build.yaml
new file mode 100644
index 0000000..6bdd5e0
--- /dev/null
+++ b/tests/properties/fixtures/authenticated_build.yaml
@@ -0,0 +1,2 @@
1properties:
2 - authenticated-build
diff --git a/tests/properties/fixtures/authorization_matrix.xml b/tests/properties/fixtures/authorization_matrix.xml
new file mode 100644
index 0000000..bdad6d2
--- /dev/null
+++ b/tests/properties/fixtures/authorization_matrix.xml
@@ -0,0 +1,20 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <hudson.security.AuthorizationMatrixProperty>
5 <permission>hudson.model.Item.Delete:admin</permission>
6 <permission>hudson.model.Item.Configure:admin</permission>
7 <permission>hudson.model.Item.Read:admin</permission>
8 <permission>hudson.model.Item.Discover:admin</permission>
9 <permission>hudson.model.Item.Build:admin</permission>
10 <permission>hudson.model.Item.Workspace:admin</permission>
11 <permission>hudson.model.Item.Cancel:admin</permission>
12 <permission>hudson.model.Run.Delete:admin</permission>
13 <permission>hudson.model.Run.Update:admin</permission>
14 <permission>hudson.scm.SCM.Tag:admin</permission>
15 <permission>hudson.model.Item.Discover:anonymous</permission>
16 <permission>hudson.model.Item.Read:anonymous</permission>
17 <permission>hudson.model.Item.ExtendedRead:anonymous</permission>
18 </hudson.security.AuthorizationMatrixProperty>
19 </properties>
20</project>
diff --git a/tests/properties/fixtures/authorization_matrix.yaml b/tests/properties/fixtures/authorization_matrix.yaml
new file mode 100644
index 0000000..7863e3b
--- /dev/null
+++ b/tests/properties/fixtures/authorization_matrix.yaml
@@ -0,0 +1,17 @@
1properties:
2 - authorization:
3 admin:
4 - job-delete
5 - job-configure
6 - job-read
7 - job-discover
8 - job-build
9 - job-workspace
10 - job-cancel
11 - run-delete
12 - run-update
13 - scm-tag
14 anonymous:
15 - job-discover
16 - job-read
17 - job-extended-read
diff --git a/tests/properties/fixtures/github.xml b/tests/properties/fixtures/github.xml
new file mode 100644
index 0000000..08413fe
--- /dev/null
+++ b/tests/properties/fixtures/github.xml
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <com.coravy.hudson.plugins.github.GithubProjectProperty>
5 <projectUrl>https://github.com/openstack-infra/jenkins-job-builder/</projectUrl>
6 </com.coravy.hudson.plugins.github.GithubProjectProperty>
7 </properties>
8</project>
diff --git a/tests/properties/fixtures/github.yaml b/tests/properties/fixtures/github.yaml
new file mode 100644
index 0000000..8aceba6
--- /dev/null
+++ b/tests/properties/fixtures/github.yaml
@@ -0,0 +1,3 @@
1properties:
2 - github:
3 url: https://github.com/openstack-infra/jenkins-job-builder/
diff --git a/tests/properties/fixtures/priority_sorter.xml b/tests/properties/fixtures/priority_sorter.xml
new file mode 100644
index 0000000..569969a
--- /dev/null
+++ b/tests/properties/fixtures/priority_sorter.xml
@@ -0,0 +1,8 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <hudson.queueSorter.PrioritySorterJobProperty>
5 <priority>150</priority>
6 </hudson.queueSorter.PrioritySorterJobProperty>
7 </properties>
8</project>
diff --git a/tests/properties/fixtures/priority_sorter.yaml b/tests/properties/fixtures/priority_sorter.yaml
new file mode 100644
index 0000000..53eb884
--- /dev/null
+++ b/tests/properties/fixtures/priority_sorter.yaml
@@ -0,0 +1,3 @@
1properties:
2 - priority-sorter:
3 priority: 150
diff --git a/tests/properties/fixtures/promoted_build.xml b/tests/properties/fixtures/promoted_build.xml
new file mode 100644
index 0000000..035c08d
--- /dev/null
+++ b/tests/properties/fixtures/promoted_build.xml
@@ -0,0 +1,11 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <hudson.plugins.promoted__builds.JobPropertyImpl>
5 <activeProcessNames>
6 <string>Release to QA</string>
7 <string>Jane Must Approve</string>
8 </activeProcessNames>
9 </hudson.plugins.promoted__builds.JobPropertyImpl>
10 </properties>
11</project>
diff --git a/tests/properties/fixtures/promoted_build.yaml b/tests/properties/fixtures/promoted_build.yaml
new file mode 100644
index 0000000..2cf5711
--- /dev/null
+++ b/tests/properties/fixtures/promoted_build.yaml
@@ -0,0 +1,5 @@
1properties:
2 - promoted-build:
3 names:
4 - "Release to QA"
5 - "Jane Must Approve"
diff --git a/tests/properties/fixtures/throttle001.xml b/tests/properties/fixtures/throttle001.xml
index 073a9f8..2c9357a 100644
--- a/tests/properties/fixtures/throttle001.xml
+++ b/tests/properties/fixtures/throttle001.xml
@@ -2,14 +2,14 @@
2<project> 2<project>
3 <properties> 3 <properties>
4 <hudson.plugins.throttleconcurrents.ThrottleJobProperty> 4 <hudson.plugins.throttleconcurrents.ThrottleJobProperty>
5 <maxConcurrentPerNode>0</maxConcurrentPerNode> 5 <maxConcurrentPerNode>2</maxConcurrentPerNode>
6 <maxConcurrentTotal>4</maxConcurrentTotal> 6 <maxConcurrentTotal>4</maxConcurrentTotal>
7 <throttleEnabled>true</throttleEnabled> 7 <throttleEnabled>true</throttleEnabled>
8 <categories> 8 <categories>
9 <string>cat1</string> 9 <string>cat1</string>
10 <string>cat2</string> 10 <string>cat2</string>
11 </categories> 11 </categories>
12 <throttleOption/> 12 <throttleOption>category</throttleOption>
13 <configVersion>1</configVersion> 13 <configVersion>1</configVersion>
14 </hudson.plugins.throttleconcurrents.ThrottleJobProperty> 14 </hudson.plugins.throttleconcurrents.ThrottleJobProperty>
15 </properties> 15 </properties>
diff --git a/tests/properties/fixtures/throttle001.yaml b/tests/properties/fixtures/throttle001.yaml
index 1fb6a06..b7e04aa 100644
--- a/tests/properties/fixtures/throttle001.yaml
+++ b/tests/properties/fixtures/throttle001.yaml
@@ -1,6 +1,8 @@
1properties: 1properties:
2 - throttle: 2 - throttle:
3 max-per-node: 2
3 max-total: 4 4 max-total: 4
4 categories: 5 categories:
5 - cat1 6 - cat1
6 - cat2 7 - cat2
8 option: category
diff --git a/tests/properties/fixtures/throttle002.xml b/tests/properties/fixtures/throttle002.xml
new file mode 100644
index 0000000..7e3d0a3
--- /dev/null
+++ b/tests/properties/fixtures/throttle002.xml
@@ -0,0 +1,16 @@
1<?xml version="1.0" encoding="utf-8"?>
2<project>
3 <properties>
4 <hudson.plugins.throttleconcurrents.ThrottleJobProperty>
5 <maxConcurrentPerNode>0</maxConcurrentPerNode>
6 <maxConcurrentTotal>0</maxConcurrentTotal>
7 <throttleEnabled>true</throttleEnabled>
8 <categories>
9 <string>cat1</string>
10 <string>cat2</string>
11 </categories>
12 <throttleOption>project</throttleOption>
13 <configVersion>1</configVersion>
14 </hudson.plugins.throttleconcurrents.ThrottleJobProperty>
15 </properties>
16</project>
diff --git a/tests/properties/fixtures/throttle002.yaml b/tests/properties/fixtures/throttle002.yaml
new file mode 100644
index 0000000..cd9b36d
--- /dev/null
+++ b/tests/properties/fixtures/throttle002.yaml
@@ -0,0 +1,6 @@
1properties:
2 - throttle:
3 categories:
4 - cat1
5 - cat2
6 option: project