From 65150193938b0ecdc532bb0495c528cae1ca1703 Mon Sep 17 00:00:00 2001 From: Shalini Khandelwal Date: Wed, 16 Sep 2020 15:35:25 +0530 Subject: [PATCH 1/2] Test commmit to run tests in upstream Signed-off-by: Shalini Khandelwal --- ci/Vagrantfile | 5 ++++- tests/dogtag/pytest-ansible/requirements.txt | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ci/Vagrantfile b/ci/Vagrantfile index 79526dc04f2..4db062fe4f9 100644 --- a/ci/Vagrantfile +++ b/ci/Vagrantfile @@ -22,7 +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 @@ -39,3 +41,4 @@ Vagrant.configure("2") do |config| # clone0.vm.network :private_network, ip: "CLONE_IP" # end end + diff --git a/tests/dogtag/pytest-ansible/requirements.txt b/tests/dogtag/pytest-ansible/requirements.txt index a658d2267b8..ae4b80a5994 100644 --- a/tests/dogtag/pytest-ansible/requirements.txt +++ b/tests/dogtag/pytest-ansible/requirements.txt @@ -6,3 +6,4 @@ pytest-autochecklog==0.2.0 configparser pytest-html pytest_marker_bugzilla +pyOpenSSL From d62e59f4eee82a86ac35b9f641c03e6c1eb1e43c Mon Sep 17 00:00:00 2001 From: Dinesh Prasanth M K Date: Mon, 14 Sep 2020 15:00:21 -0700 Subject: [PATCH 2/2] CI: Add QE pytests to upstream CI pipeline This patch executes pytests and runs CA related tests on the VMs provisioned. Signed-off-by: Dinesh Prasanth M K --- .github/workflows/qe-tests.yml | 9 +++++++++ ci/Vagrantfile | 3 +-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/qe-tests.yml b/.github/workflows/qe-tests.yml index 58cfda11768..e50531f347c 100644 --- a/.github/workflows/qe-tests.yml +++ b/.github/workflows/qe-tests.yml @@ -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 diff --git a/ci/Vagrantfile b/ci/Vagrantfile index 4db062fe4f9..3756380a24b 100644 --- a/ci/Vagrantfile +++ b/ci/Vagrantfile @@ -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 @@ -41,4 +41,3 @@ Vagrant.configure("2") do |config| # clone0.vm.network :private_network, ip: "CLONE_IP" # end end -