ara_tests: move test results and stop cleaning them up

Ansible and the tests should be idempotent, there's no need to clean
things up.

Change-Id: I63feda9d6b4d7d7a35e94da2c71011330cde2e16
This commit is contained in:
David Moreau Simard 2019-05-15 08:51:39 -04:00
parent f8e31af454
commit 426016a8a6
No known key found for this signature in database
GPG Key ID: CBEB466764A9E621
4 changed files with 6 additions and 13 deletions

View File

@ -16,6 +16,7 @@
name: ansible-role-ara-tests-base name: ansible-role-ara-tests-base
parent: base parent: base
vars: vars:
ara_tests_cleanup: false
integration_ansible_name: "{{ ansible_user_dir }}/src/github.com/ansible/ansible" integration_ansible_name: "{{ ansible_user_dir }}/src/github.com/ansible/ansible"
integration_ansible_version: null integration_ansible_version: null
run: playbooks/ara_tests.yaml run: playbooks/ara_tests.yaml
@ -61,6 +62,7 @@
pre-run: tests/role-integration-pre.yaml pre-run: tests/role-integration-pre.yaml
run: playbooks/ara_api.yaml run: playbooks/ara_api.yaml
vars: vars:
ara_tests_cleanup: false
ara_api_source: "{{ ansible_user_dir }}/src/opendev.org/recordsansible/ara" ara_api_source: "{{ ansible_user_dir }}/src/opendev.org/recordsansible/ara"
ansible_python_interpreter: /usr/bin/python3 ansible_python_interpreter: /usr/bin/python3

View File

@ -20,13 +20,10 @@
ara_tests_root: "/tmp/ara-integration-tests" ara_tests_root: "/tmp/ara-integration-tests"
# Directory where the virtualenv will be created # Directory where the virtualenv will be created
ara_tests_virtualenv: "{{ ara_tests_root }}/virtualenv" ara_tests_virtualenv: "{{ ara_tests_root }}/ara-tests-virtualenv"
# Directory where ARA_BASE_DIR will be set # Directory where ARA_BASE_DIR will be set
ara_tests_data: "{{ ara_tests_root }}/.ara" ara_tests_data: "{{ ara_tests_root }}/.ara/server"
# Whether the root directory should be cleaned up between runs
ara_tests_cleanup: true
# Name of the Ansible package # Name of the Ansible package
# This can be "ansible" which will use pip or it could be something like # This can be "ansible" which will use pip or it could be something like

View File

@ -16,13 +16,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with ARA. If not, see <http://www.gnu.org/licenses/>. # along with ARA. If not, see <http://www.gnu.org/licenses/>.
- name: Clean up integration test root - name: Ensure integration test root exists
file:
path: "{{ ara_tests_root }}"
state: absent
when: ara_tests_cleanup | bool
- name: Create integration test root
file: file:
path: "{{ ara_tests_root }}" path: "{{ ara_tests_root }}"
state: directory state: directory

View File

@ -27,7 +27,7 @@
recurse: yes recurse: yes
- name: Recover integration test data - name: Recover integration test data
command: cp -rp /tmp/ara-integration-tests/.ara {{ ansible_user_dir }}/workspace/logs/data command: cp -rp /tmp/ara-integration-tests/.ara/server {{ ansible_user_dir }}/workspace/logs/server
- name: Upload log artifacts - name: Upload log artifacts
synchronize: synchronize: