First tests
Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This commit is contained in:
parent
023a0def73
commit
a5499de9e0
6 changed files with 108 additions and 0 deletions
8
tests/Makefile
Normal file
8
tests/Makefile
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
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
|
||||
|
||||
#
|
||||
all:
|
||||
generator
|
||||
$(CMD)
|
||||
30
tests/config.yaml
Normal file
30
tests/config.yaml
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
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
|
||||
module:
|
||||
docker:
|
||||
start: "docker run -it"
|
||||
container: docker.io/ruby
|
||||
rpm:
|
||||
repos:
|
||||
- http://download.eng.brq.redhat.com/pub/fedora/linux/development/rawhide/Everything/x86_64/os/
|
||||
- http://download.eng.brq.redhat.com/pub/fedora/linux/development/26/Everything/x86_64/os/
|
||||
test:
|
||||
cmd:
|
||||
- 'which ruby'
|
||||
version:
|
||||
- 'ruby -v'
|
||||
testhost:
|
||||
hostname:
|
||||
- 'hostname'
|
||||
25
tests/generated.py
Normal file
25
tests/generated.py
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/python
|
||||
|
||||
import socket
|
||||
from avocado import main
|
||||
from moduleframework import module_framework
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
||||
class GeneratedTestsConfig(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.runHost("hostname")
|
||||
Loading…
Add table
Add a link
Reference in a new issue