#!/usr/bin/python # -*- coding: utf-8 -*- # # This Modularity Testing Framework helps you to write tests for modules # Copyright (C) 2017 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # he Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # Authors: Petr Sklenar # from moduleframework import module_framework import os import time class simpleTests(module_framework.AvocadoTest): """ :avocado: enable """ def test_iputils(self): self.start() 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')