def test_service(self): "Tests the crond service." out, err, eid = system('systemctl status crond.service') self.assertIn('inactive', out) system('systemctl start crond.service') out, err, eid = system('systemctl status crond.service') self.assertIn('disabled', out) system('systemctl stop crond.service') out, err, eid = system('systemctl status crond.service') self.assertIn('inactive', out) system('systemctl enable crond.service')
def test_service(self): "Tests the crond service." out, err, eid = system('systemctl status crond.service') self.assertIn('disabled', out)
def test_service(self): "Tests the crond service." out, err, eid = system('systemctl status crond.service') self.assertIn('active (running)', out) system('systemctl disable crond.service')
def test_selinux(self): "Tests the SELinux" out, err, eid = system('sudo getenforce') out = out.strip() self.assertEquals(out, 'Enforcing')
def test_services(self): "No service should fail in the startup." out, err, eid = system('systemctl --all --failed') self.assertIn('0 loaded units listed', out)
def test_packageinstall(self): "Tests package install using dnf" system('dnf install pss -y') out, err, eid = system('ls -l /usr/bin/pss') self.assertIn('root', out)
def test_logging(self): "Tests journald logging" out, err, eid = system( 'sudo journalctl -a --no-pager -r --since=$(date +%Y-%m-%d) -n1') self.assertGreater(len(out.split()), 3, "journalctl output is missing.")
def test_logging(self): "Tests journald logging" out, err, eid = system('sudo journalctl -a --no-pager -r --since=$(date +%Y-%m-%d) -n1') self.assertGreater(len(out.split()), 3, "journalctl output is missing.")