Patch prepares ground for further work on tripleo_validations
unit tests.
Datastructures used for testing were factored out.
__init__.py files for lookup plugins and library tests were added.
Together with minimal docstring.
.gitingore was updated to ignore stestr files.
test-requirements.txt and requirements.txt were updated to include
all necessary dependencies
Depends-On: https://review.rdoproject.org/r/c/openstack/tripleo-validations-distgit/+/32545
Closes-Bug: #1922726
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: If67992bec97831cc45b46e33af234a9444c5ae4c
* using multinode jobs for validations is too heavy
and uses too much resources
* remove standalone004 - worthless sans rpm build
* add a validations job that targets validations
Change-Id: Ifef837dc884c7338f9396214e36a197cdbb060c6
Python 3.6 is the oldest version of python
supported by the package, and newer, supported,
minor versions do not break any substantial functionality
by design, while introducing new features.
Therefore we do not need to run unit tests for
each minor version. As all possible issues affecting
versions >3.6 would necessarily be related to features
introduced in versions >3.6.
Wallaby Zuul test template was removed from layout.yaml.
The pep8 test environment was folded into linters in tox.ini.
Zuul is now explicitly running tests only in one, oldest supported,
python environment, Python 3.6.
PEP387: https://www.python.org/dev/peps/pep-0387/https://docs.python.org/3/whatsnew/3.7.html#porting-to-python-37https://docs.python.org/3/whatsnew/3.8.html#porting-to-python-3-8
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: If8e31e72b215dcdb0db897b03403e8d28a2545b3
This should have been in the initial patch, arguably.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I765218b61f761ce1df387abea33e35f2c96a1ec6
This brings coverage measuring in line with
the standard tox testing process.
Closes-bug: #1922726
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I6bf27ffe88ff55b62e202678340a324058d30051
As this rule has been merged upstream, we don't need it anymore locally.
This patch also bumps the ansible-lint release from v4.3.5 to v5.0.3
It also mocks the following modules and roles coming from
validations-common to pass the --syntax-check:
- hiera, validations_read_ini and warn customs libs
- check_latest_packages_version role
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: Idc560dd4c459228da43a1e7b3dc089d379b9dccb
This patch adds a new TripleO specific playbook which will call the
check_latest_packages_version role hosted in validations-common. This
playbook will test if the python3-tripleoclient package is at its latest
version on the Undercloud before starting an upgrade.
Note1: The check-latest-packages-versions validation hosted in
validations-common will be refactored to only test non TripleO packages.
Note2: The documentation automation has been modified to point to the
external role official documentation.
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I606f650029dd4daad7dc7aac248c388130e9d503
This patch adds basic configuration for tox-ansible[1].
Tox-ansible is a plugin for tox which auto-generates tox environments
for running quality assurance tools like ansible-test or molecule. This
tool is rather tightly integrated for the official Molecule testing tool
that integrates with Ansible.
At first, it will allow us to list very quickly all the Ansible Molecule
tests for each roles with their scenario(s):
Example:
$ tox -l
...
roles-ceph-ceph-ansible-installed
roles-ceph-default
roles-check_kernel_version-default
roles-check_network_gateway-default
roles-check_rhsm_version-default
roles-check_rhsm_version-rhsm_mismatch
roles-check_undercloud_conf-config_OK
roles-check_undercloud_conf-default
roles-check_undercloud_conf-deprecated_drivers
roles-check_undercloud_conf-deprecated_params
roles-check_undercloud_conf-required_missing
...
However, we won't be able to execute them as it for now without to make
some small manual modifications in the molecule.yml file first before to
execute them. This will be covered as soon as possible in a following-patch.
[1] - https://github.com/ansible-community/tox-ansible
Signed-off-by: Gael Chamoulaud (Strider) <gchamoul@redhat.com>
Change-Id: Ia1606db814f37a11e48508139b90cdd43c083f6b
* Use static inventory for tripleo-validations role for component CI
* Remove nova-svirt from the component compute list since this validation
is not made for running on Standalone deployment.
* Moving neutron-sanity-check to undercloud-neutron-sanity-check because
this validation is made for being kicked against an Overcloud
* And replace disk-check by process count for Component CI PoC
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: I2de47f7226c232226712cf45be7d1dfb4b62873a
As part of [1] lets remove the dependency on linters from the
content-provider in the gate, in line with all the other repos.
We don't want to delay the gate for linting since any issues should
be resolved before a change hits the gate.
[1] https://review.opendev.org/q/topic:tripleo-ci-reduce
Change-Id: I31ad623cae3db284b4f6b694033fab5bb9dc4360
Number of the environment variables passed to tox envs was
reduced from all, to just one.
This is preparatory step for further test developmet.
Reviews for test infrastructure, refactoring and coverage
will be on branches from this one.
tools/validate_files.py:
Changed encoding to utf-8 to prevent
linting error.
Signed-off-by: Jiri Podivin <jpodivin@redhat.com>
Change-Id: Idd82aecb7b66433396639ed800a33b109a06e11a
On Fedora 33 user: doesn't create id_rsa.pub, so next task fails as
TASK [Slurp pub key]
fatal: [test]: FAILED! => {
"changed": false
}
MSG:
file not found: /home/sgolovat/.ssh/id_rsa.pub
This patch replaces user: with openssh_keypair: to have more control
over ssh key pair creation
Change-Id: I6b303c13957f905aae0a04ea99cf53ceb9684de2
Enable virtualenv after installation. Without it, python packages from
system location will be used. So if bindep is not installed in system
packages the failure will be as
~/tripleo-validations/scripts/..//scripts/bindep-install: line 37: bindep: command not found
This patch activates virtualenv after creation on previous step in
accordance rather than before pytest.
Change-Id: I3725bf64bead30b02f10eb9a68d220c4e422b531
If operator runs script without any variables it will fail as
scripts/run-local-test: line 26: $1: unbound variable
This patch adds usage function and check if script is run without
ROLE_NAME
Change-Id: I9137821c8396568be125ec686bad2534f9d433b2
Function get_deployment_status requires the stack_name parameter, cannot pass plan=plan
Without fix, getting this error:
openstack tripleo validator run --group pre-update-prepare --plan overcloud
get_deployment_status() got an unexpected keyword argument 'plan'
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I7b5da62a564c22738427632ea03b1e33cdf2f89a
Updated _run_validator_run to no longer raise an execption if/when a group is empty
Using a log vs. exception is useful when we want to run an automated set of validations
within our Update CI pipeline.
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I1046148da87712934184373a10fa3d2a46e620e4
Use -H switch on find command to follow symbolic links for
find command line arguments.
Co-authored-by: Daniel Bengtsson <dbengt@redhat.com>
Change-Id: I60c8703e06fb8e399dce0f009e434d0cc3731e64
This role will hit the overcloud API for nova and cinder, retrieve the
services and will trig a failure if one of these services are either
down or deprecated. The original intent was to validate that
nova-consoleauth was deleted after an update to RHOSP16.
Related: https://bugzilla.redhat.com/1921115
Change-Id: I057349fdac90a093c67aeb0b2f0a825c4c915e0b
If a molecule has a defined converge playbook, we should use it instead
of defaulting to the role's playbook.
Change-Id: Idc55fba78ce91d472ed367f5097505c9a5d9b6dd