Skip to content

Commit

Permalink
add simple ansible and rex tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni authored and ehelms committed Feb 11, 2021
1 parent ef6f01e commit 07f4de6
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
8 changes: 8 additions & 0 deletions bats/fb-test-foreman-ansible.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bats
# vim: ft=sh:sw=2:et

set -o pipefail

@test "run 'uptime' via Ansible" {
hammer job-invocation create --job-template 'Run Command - Ansible Default' --inputs 'command=uptime' --search-query "name = $HOSTNAME"
}
8 changes: 8 additions & 0 deletions bats/fb-test-foreman-rex.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bats
# vim: ft=sh:sw=2:et

set -o pipefail

@test "run 'uptime' via Remote Execution" {
hammer job-invocation create --job-template 'Run Command - SSH Default' --inputs 'command=uptime' --search-query "name = $HOSTNAME"
}
6 changes: 5 additions & 1 deletion pipelines/vars/forklift_luna.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ server_box:
- "--puppet-server-max-active-instances 1"
- "--puppet-server-jvm-min-heap-size 1G"
- "--puppet-server-jvm-max-heap-size 1G"
- "--enable-foreman-cli-ansible"
- "--enable-foreman-cli-discovery"
- "--enable-foreman-cli-openscap"
- "--enable-foreman-cli-remote-execution"
Expand All @@ -27,8 +28,11 @@ server_box:
- "--enable-foreman-plugin-remote-execution"
- "--enable-foreman-plugin-templates"
- "--enable-foreman-plugin-virt-who-configure"
- "--foreman-proxy-plugin-remote-execution-ssh-install-key=true"
bats_tests_additional:
"{{ ['fb-katello-proxy.bats'] if pipeline_os != 'centos8' else [] }}"
- "fb-test-foreman-rex.bats"
- "fb-test-foreman-ansible.bats"
- "fb-katello-proxy.bats"
proxy_box:
box: "{{ pipeline_os }}"
memory: 3072
Expand Down
4 changes: 4 additions & 0 deletions pipelines/vars/forklift_plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ server_box:
- "--puppet-server-max-active-instances 1"
- "--puppet-server-jvm-min-heap-size 1G"
- "--puppet-server-jvm-max-heap-size 1G"
- "--enable-foreman-cli-ansible"
- "--enable-foreman-cli-discovery"
- "--enable-foreman-cli-remote-execution"
- "--enable-foreman-cli-tasks"
Expand All @@ -21,13 +22,16 @@ server_box:
- "--enable-foreman-proxy-plugin-ansible"
- "--enable-foreman-proxy-plugin-discovery"
- "--enable-foreman-proxy-plugin-remote-execution-ssh"
- "--foreman-proxy-plugin-remote-execution-ssh-install-key=true"
- "{{ '--enable-foreman-cli-openscap' if pipeline_os.startswith('centos') else '' }}"
- "{{ '--enable-foreman-plugin-openscap' if pipeline_os.startswith('centos') else '' }}"
- "{{ '--enable-foreman-proxy-plugin-openscap' if pipeline_os.startswith('centos') else '' }}"
bats_tests:
- "fb-verify-packages.bats"
- "fb-test-foreman.bats"
- "fb-test-puppet.bats"
- "fb-test-foreman-rex.bats"
- "fb-test-foreman-ansible.bats"
bats_teardown: []
forklift_boxes:
"{{ {forklift_server_name: server_box, forklift_smoker_name: smoker_box} }}"

0 comments on commit 07f4de6

Please sign in to comment.