From e64896a9b89034aa97076be9f2cb15118ba23d75 Mon Sep 17 00:00:00 2001 From: Sachin Prabhu Date: Sun, 12 Apr 2020 23:51:42 +0100 Subject: Run tests on client Fetch tests from the samba-integration-tests repo and run on the client. Signed-off-by: Sachin Prabhu --- vagrant/ansible/roles/client.prep/tasks/main.yml | 1 + vagrant/ansible/roles/client.test.prep/tasks/main.yml | 19 +++++++++++++++++++ vagrant/ansible/roles/client.test/tasks/main.yml | 5 +++++ vagrant/ansible/setup-clients.yml | 2 ++ 4 files changed, 27 insertions(+) create mode 100644 vagrant/ansible/roles/client.test.prep/tasks/main.yml create mode 100644 vagrant/ansible/roles/client.test/tasks/main.yml diff --git a/vagrant/ansible/roles/client.prep/tasks/main.yml b/vagrant/ansible/roles/client.prep/tasks/main.yml index 284521f..808a678 100644 --- a/vagrant/ansible/roles/client.prep/tasks/main.yml +++ b/vagrant/ansible/roles/client.prep/tasks/main.yml @@ -8,6 +8,7 @@ - cifs-utils - samba-test - python-pip + - git state: latest - name: Install Python yaml package diff --git a/vagrant/ansible/roles/client.test.prep/tasks/main.yml b/vagrant/ansible/roles/client.test.prep/tasks/main.yml new file mode 100644 index 0000000..307590a --- /dev/null +++ b/vagrant/ansible/roles/client.test.prep/tasks/main.yml @@ -0,0 +1,19 @@ +--- +- name: Fetch the latest samba-integration-tests repo + git: + repo: 'https://github.com/gluster/samba-integration.git' + version: tests + dest: /root/samba-integration-tests + +- name: Create a symlink for test-info.yml file + file: + src: /root/test-info.yml + dest: /root/samba-integration-tests/test-info.yml + owner: root + group: root + state: link + +- name: Run tests + command: + chdir: /root/samba-integration-tests + cmd: make test diff --git a/vagrant/ansible/roles/client.test/tasks/main.yml b/vagrant/ansible/roles/client.test/tasks/main.yml new file mode 100644 index 0000000..25403a4 --- /dev/null +++ b/vagrant/ansible/roles/client.test/tasks/main.yml @@ -0,0 +1,5 @@ +--- +- name: Run tests + command: + chdir: /root/samba-integration-tests + cmd: make test diff --git a/vagrant/ansible/setup-clients.yml b/vagrant/ansible/setup-clients.yml index 47eecbb..f6cf516 100644 --- a/vagrant/ansible/setup-clients.yml +++ b/vagrant/ansible/setup-clients.yml @@ -6,3 +6,5 @@ roles: - common.prep - client.prep + - client.test.prep + - client.test -- cgit