Add unit tests
Change-Id: Ife40aafb3d5cde4282d5f0c694c9bc798608871a
diff --git a/tests/pillar/client.sls b/tests/pillar/client.sls
new file mode 100644
index 0000000..d1078a5
--- /dev/null
+++ b/tests/pillar/client.sls
@@ -0,0 +1,69 @@
+jenkins:
+ client:
+ enabled: true
+ master:
+ host: jenkins.example.com
+ port: 80
+ protocol: http
+ job:
+ jobname:
+ type: workflow
+ param:
+ bool_param:
+ type: boolean
+ description: true/false
+ default: true
+ string_param:
+ type: string
+ description: 1 liner
+ default: default_string
+ text_param:
+ type: text
+ description: multi-liner
+ default: default_text
+ jobname_scm:
+ type: workflow-scm
+ concurrent: false
+ scm:
+ type: git
+ url: https://github.com/jenkinsci/docker.git
+ branch: master
+ script: Jenkinsfile
+ github:
+ url: https://github.com/jenkinsci/docker
+ name: "Jenkins Docker Image"
+ trigger:
+ timer:
+ spec: "H H * * *"
+ github:
+ pollscm:
+ spec: "H/15 * * * *"
+ reverse:
+ projects:
+ - test1
+ - test2
+ state: SUCCESS
+ param:
+ bool_param:
+ type: boolean
+ description: true/false
+ default: true
+ string_param:
+ type: string
+ description: 1 liner
+ default: default_string
+ text_param:
+ type: text
+ description: multi-liner
+ default: default_text
+ approved_scripts:
+ - method groovy.json.JsonSlurperClassic parseText java.lang.String
+java:
+ environment:
+ enabled: true
+ version: '10'
+ release: '0.1'
+ build: '10'
+ oracle_hash: 'fb4372174a714e6b8c52526dc134031e'
+ platform: oracle-java
+ development: true
\ No newline at end of file
diff --git a/tests/pillar/master.sls b/tests/pillar/master.sls
new file mode 100644
index 0000000..00f0cdd
--- /dev/null
+++ b/tests/pillar/master.sls
@@ -0,0 +1,53 @@
+jenkins:
+ master:
+ enabled: true
+ mode: EXCLUSIVE
+ no_config: false
+ slaves:
+ - name: slave01
+ label: pbuilder
+ executors: 2
+ - name: slave02
+ label: image_builder
+ mode: EXCLUSIVE
+ executors: 2
+ views:
+ - name: "Package builds"
+ regex: "debian-build-.*"
+ - name: "Contrail builds"
+ regex: "contrail-build-.*"
+ - name: "Aptly"
+ regex: "aptly-.*"
+ plugins:
+ - name: slack
+ - name: extended-choice-parameter
+ - name: rebuild
+ - name: test-stability
+ email:
+ engine: "smtp"
+ host: "smtp.domain.com"
+ user: "user@domain.cz"
+ password: "smtp-password"
+ port: 25
+ http:
+ port: 80
+ approved_scripts:
+ - method groovy.json.JsonSlurperClassic parseText java.lang.String
+ user:
+ admin:
+ api_token: xxxxxxxxxx
+ password: admin_password
+ email: admin@domain.com
+ user01:
+ api_token: xxxxxxxxxx
+ password: user_password
+ email: user01@domain.com
+java:
+ environment:
+ enabled: true
+ version: '10'
+ release: '0.1'
+ build: '10'
+ oracle_hash: 'fb4372174a714e6b8c52526dc134031e'
+ platform: oracle-java
+ development: true
\ No newline at end of file
diff --git a/tests/pillar/slave.sls b/tests/pillar/slave.sls
new file mode 100644
index 0000000..fe00f46
--- /dev/null
+++ b/tests/pillar/slave.sls
@@ -0,0 +1,39 @@
+jenkins:
+ slave:
+ enabled: true
+ master:
+ host: jenkins.example.com
+ port: 80
+ protocol: http
+ user:
+ name: jenkins_slave
+ password: dexiech6AepohthaiHook2iesh7ol5ook4Ov3leid3yek6daid2ooNg3Ee2oKeYo
+ gpg:
+ keypair_id: A76882D3
+ public_key: |
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ ...
+ private_key: |
+ -----BEGIN PGP PRIVATE KEY BLOCK-----
+ ...
+java:
+ environment:
+ enabled: true
+ version: '10'
+ release: '0.1'
+ build: '10'
+ oracle_hash: 'fb4372174a714e6b8c52526dc134031e'
+ platform: oracle-java
+ development: true
+linux:
+ system:
+ enabled: true
+ user:
+ not_a_jenkins:
+ enabled: true
+ name: notJenkins
+ sudo: false
+ uid: 9991
+ full_name: Not A. Jenkins
+ home: /home/notjenkins
+ home_dir_mode: 755
\ No newline at end of file