Update tests.

Keep watching a workflow with modularity-testing-framework will be stable.
This commit is contained in:
Jun Aruga 2017-09-04 19:36:56 +02:00
commit 92fcf2522e
5 changed files with 33 additions and 82 deletions

View file

@ -1,7 +1,14 @@
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
# --filter-by-tags=-WIP: ignore WIP tag test that have a issue on F25 avocado.
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
# A workflow with modularity-testing-framework is still uncertain.
# Only nspawn is actually used.
# https://meta-test-family.readthedocs.io/en/latest/index.html
#
all:
$(CMD)
# Installation
# $ sudo dnf install modularity-testing-framework python2-avocado
# $ sudo /usr/bin/pip install behave
test:
mtf-generator
MODULE=nspawn \
python -d -m avocado run \
--filter-by-tags=-WIP \
/usr/share/moduleframework/tools/modulelint.py \
*.py

View file

@ -2,20 +2,10 @@ document: modularity-testing
version: 1
name: ruby
modulemd-url: https://src.fedoraproject.org/cgit/modules/ruby.git/plain/ruby.yaml
service:
port: 8080
packages:
rpms:
# add which here because of the issue.
# https://pagure.io/modularity-testing-framework/issue/45
- ruby
testdependecies:
rpms:
- which
- hostname
module:
docker:
container: docker.io/ruby
rpm:
repos:
- http://mirror.vutbr.cz/fedora/releases/25/Everything/x86_64/os/
- http://mirror.vutbr.cz/fedora/releases/26/Everything/x86_64/os/
test:
version:
- 'ruby -v'

View file

@ -1,26 +0,0 @@
#!/usr/bin/python
import socket
from avocado import main
from moduleframework import module_framework
class RubyTests(module_framework.AvocadoTest):
"""
:avocado: enable
"""
def test_cmd(self):
self.start()
self.run("which ruby")
def test_version(self):
self.start()
self.run("ruby -v")
def test_hostname(self):
self.start()
self.run("hostname")
if __name__ == '__main__':
main()