http://modularity-testing-framework.readthedocs.io
YAML Config file
Self generated tests
0
return code of command (like: ls / |grep sbin
directory sbin exists in root dir)generator
binary explicitly, it then create these pythonish tests with bash inside, Unittest doesn not allow to have dynamic tests.Avocado tests
./base/modulelint.py
memcached
moduleSimple bash tests
bash
like testsmoduleframework-cmd
command in /usr/bin
WIP: Behave tests
dnf -y install vagrant
vagrant up
docker python-pip
avocado-framework yaml json behave
dnf -y install docker python-pip pip install avocado-framework yaml json behave
config.yaml
DEBUG
Enable debugging output to test outputCONFIG
file with MTF configuration default is config.yaml
MODULE
which module type to test (in case there is not set default-module
in config, you HAVE TO set it)
=docker
uses section docker inside config file and will use docker containerisation=nspawn
systemd nspawn, it is lightweight virtualization, it does something like MOCK but it is not just chroot, but has own systemd etc.=rpm
testing of local RPM packages directly on HOST (it could be DESTRUCTIVE)URL
see example config. It overwrites value module.docker.container
or module.rpm.repo
to whatever you want. It has to be proper type what is set in MODULE
MODULEMDURL
overwrite location of moduleMD fileCOMPOSEURL
overwrite location of compose repo locationPROFILE
overwrite default profile to whatever you want to install instead of thatMTF_SKIP_DISABLING_SELINUX
In nspawn type on fedora-25 we have to disable selinux, because it does not work well with selinux enabled, this option allows to not do that.MTF_DO_NOT_CLEANUP
Do not cleanup modules between tests, in case there is no interference in your tests you can use it, and it will be fastMTF_REMOTE_REPOS
It disables downloading of packages done by koji and creating local repo, it make tests fast. (There is issue that composes (repos) are sometimes bad in fedora, unable to use)dnf copr enable phracek/Modularity-testing-framework
dnf install -y modularity-testing-framework
MODULE=docker avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py
MODULE=nspawn avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py
MODULE=rpm avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py
make check
- runs tests in your module directorydnf copr enable phracek/Modularity-testing-framework
dnf install -y modularity-testing-framework
/usr/bin/generator
or simply generator
.MODULE=docker avocado run /usr/share/moduleframework/tools/modulelint.py ./*.py
Framework is released under the GPL, version 2 or later, see LICENSE file in project