pcs/tests/tests.yml
Michal Pospisil 2a44ad90e1 Cleanup of c8s branch
Source files were erroneously imported during creating the c8s branch,
this commit removes them. It also adds the STI test setup for gating
which was not imported.
2023-05-25 18:17:01 +02:00

67 lines
2.0 KiB
YAML

- hosts: localhost
tags:
- classic
vars:
# standard-test-basic directory for tests are relative to {{ tenv_workdir }}
tenv_workdir: /var/test
pre_tasks:
- import_role:
name: standard-test-source
vars:
fetch_only: True
- name: Copy files including source to test environment
synchronize:
src: "{{ playbook_dir }}/.."
dest: "{{ tenv_workdir }}"
mode: push
ssh_args: "-o UserKnownHostsFile=/dev/null"
roles:
# roles documentation:
# https://pagure.io/standard-test-roles/blob/master/f/roles/standard-test-source
- role: standard-test-basic
required_packages:
- autoconf
- automake
- make
- rpm-build
- ruby-devel
- git-core
- booth-site
- fence-agents-apc
- fence-agents-ipmilan
- fence-agents-scsi
- fence-virt
- pcs
- python3-setuptools_scm
- python3-wheel
- rubygem-test-unit
- wget
required_services:
- pcsd
tests:
# dir: . -> dot means tests dir in distgit
- prepare-source:
dir: ./
run: rpmbuild -bp {{tenv_workdir}}/*.spec --nodeps --define "_sourcedir {{tenv_workdir}}" --define "_builddir {{tenv_workdir}}/source"
# pcs-web-ui sources are deleted because there are conflicts during move of sources
# pcs-web-ui sources aren't needed during testing
- flatten-source:
dir: ./
run: rm -rf {{tenv_workdir}}/source/pcs-web-ui-*; shopt -s dotglob; mv {{tenv_workdir}}/source/*/* {{tenv_workdir}}/source
- build_sources:
dir: ./source
run: "export PYTHONPATH=/usr/lib64/pcs/pcs_bundled/packages/; export GEM_HOME=/usr/lib64/pcsd/vendor/bundle/; ./autogen.sh && ./configure --enable-tests-only"
- remove_sources:
dir: ./source
run: rm -rfv pcs
- run_upstream_tier0_tests:
dir: ./source
run: pcs_test/suite --tier0 -v --vanilla --installed
- run_upstream_tier1_tests:
dir: ./source
run: pcs_test/suite --tier1 -v --vanilla --installed
- run_smoke_tests:
dir: ./source
run: pcs_test/smoke.sh