Example #1
0
 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')
Example #2
0
 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')
Example #3
0
 def test_service(self):
     "Tests the crond service."
     out, err, eid = system('systemctl status crond.service')
     self.assertIn('disabled', out)
Example #4
0
 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')
Example #5
0
 def test_service(self):
     "Tests the crond service."
     out, err, eid = system('systemctl status crond.service')
     self.assertIn('disabled', out)
Example #6
0
 def test_selinux(self):
     "Tests the SELinux"
     out, err, eid = system('sudo getenforce')
     out = out.strip()
     self.assertEquals(out, 'Enforcing')
Example #7
0
 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')
Example #8
0
 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)
Example #9
0
 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)
Example #10
0
 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.")
Example #11
0
 def test_selinux(self):
     "Tests the SELinux"
     out, err, eid = system('sudo getenforce')
     out = out.strip()
     self.assertEquals(out, 'Enforcing')
Example #12
0
 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)
Example #13
0
 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)
Example #14
0
 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.")