Skip to content

Commit

Permalink
CI: Add QE pytests to upstream CI pipeline
Browse files Browse the repository at this point in the history
This patch executes pytests and runs CA related tests
on the VMs provisioned.

Signed-off-by: Dinesh Prasanth M K <[email protected]>
  • Loading branch information
SilleBille committed Sep 21, 2020
1 parent 6515019 commit d62e59f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/qe-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,15 @@ jobs:
- name: Set up PKI deployment by running playbook on "controller"
run: vagrant provision controller

- name: Run CA related tests
run: |
vagrant ssh controller -c \
'pytest --ansible-host-pattern master \
--ansible-inventory /vagrant/inventory \
--ansible-module-path /vagrant/tests/dogtag/pytest-ansible/common-modules/ \
/vagrant/tests/dogtag/pytest-ansible/pytest/sanity/test_role_users.py \
--junit-xml pki_cert_junit.xml -qsvvv'
- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v2
3 changes: 1 addition & 2 deletions ci/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ Vagrant.configure("2") do |config|
ansible.verbose = "vv"
ansible.raw_arguments = "-M /vagrant/tests/dogtag/pytest-ansible/common-modules/"
end

controller.vm.provision "shell", inline: "export ANSIBLE_LIBRARY=/vagrant/tests/dogtag/pytest-ansible/common-modules/"
controller.vm.provision "shell", inline: "pip install -e /vagrant/tests/dogtag/pytest-ansible/"
controller.vm.provision "shell", inline: "py.test --ansible-inventory /vagrant/inventory --ansible-host-pattern master /vagrant/tests/dogtag/pytest-ansible/pytest/sanity/test_role_users.py -vvvvvvvvv"
controller.vm.network :private_network, ip: "CONTROLLER_IP"
end

Expand All @@ -41,4 +41,3 @@ Vagrant.configure("2") do |config|
# clone0.vm.network :private_network, ip: "CLONE_IP"
# end
end

0 comments on commit d62e59f

Please sign in to comment.