Add more tests and dependencies

Signed-off-by: Petr "Stone" Hracek <phracek@redhat.com>
This commit is contained in:
Petr "Stone" Hracek 2017-05-03 15:04:48 +02:00
commit 32a28ee3c2
7 changed files with 142 additions and 114 deletions

View file

@ -1,12 +1,6 @@
MODULE_LINT=/usr/lib/python2.7/site-packages/moduleframework/modulelint.py
MODULE_LINT=/usr/share/moduleframework/tools/modulelint.py
CMD=python -m avocado run --filter-by-tags=-WIP $(MODULE_LINT) *.py
#
generate:
generator
check:
all:
$(CMD)
all: generate check

View file

@ -1,24 +1,19 @@
document: modularity-testing
version: 1
name: debugging-tools
modulemd-url: https://raw.githubusercontent.com/container-images/debugging-tools/master/debugging-tools.yaml
modulemd-url: http://raw.githubusercontent.com/container-images/debugging-tools-base/master/debugging-tools-base.yaml
source: https://github.com/container-images/debugging-tools-base
packages:
rpms:
- iproute
- iputils
- lsof
- net-tools
- passwd
- strace
source: https://github.com/container-images/debugging-tools
- valgrind
module:
docker:
source: https://github.com/container-images/debugging-tools-base.git
container: docker.io/modularitycontainers/debugging-tools-base
rpm:
repos:
- http://mirror.vutbr.cz/fedora/releases/25/Everything/x86_64/os/
- https://phracek.fedorapeople.org/debugging-tools-repo/
test:
processrunning:
# Tests for iputils
- 'ls /usr/bin/ping'
- 'ls /usr/bin/tracepath'
# Tests for lsof
#- 'ls /usr/bin/lsof'
# Tests for strace
#- 'ls /usr/bin/strace'

View file

@ -31,13 +31,39 @@ class simpleTests(module_framework.AvocadoTest):
:avocado: enable
"""
def testAssertIn(self):
def test_iputils(self):
self.start()
# Tests for iputils
self.assertIn('Ping exists!', self.runHost('ls /usr/bin/ping').stdout)
self.assertIn('tracepath exists!', self.runHost('ls /usr/bin/tracepath').stdout)
# Tests for lsof
#self.assertIn('lsof exists!', self.runHost('ls /usr/bin/lsof').stdout)
# Tests for strace
#self.assertIn('strace exists!', self.runHost('ls /usr/bin/strace').stdout)
self.run('ls -al /usr/bin/ping')
self.run('ls -al /usr/bin/tracepath')
self.run('lsof /')
def test_iproute(self):
self.start()
self.run('ls -al /usr/sbin/ip')
self.run('ls -al /usr/sbin/ifcfg')
x = self.run('/usr/sbin/ifcfg', ignore_status=True)
self.assertEqual(1, x.exit_status)
self.run('ls -al /usr/sbin/ifstat')
self.run('/usr/sbin/ifstat')
def test_lsof(self):
self.run('lsof /')
def test_net_tools(self):
self.run('ls -al /usr/sbin/route')
self.run('route')
self.run('ls -al /usr/bin/netstat')
self.run('netstat')
def test_passwd(self):
self.run('ls -al /usr/bin/passwd')
self.run('passwd --help')
def test_strace(self):
self.run('ls -al /usr/bin/strace')
self.run('strace -h')
def test_valgrind(self):
self.run('ls -al /usr/bin/valgrind')
self.run('valgrind -h')