ssh.py 665 B

123456789101112131415
  1. from oeqa.runtime.case import OERuntimeTestCase
  2. from oeqa.core.decorator.depends import OETestDepends
  3. from oeqa.runtime.decorator.package import OEHasPackage
  4. class SSHTest(OERuntimeTestCase):
  5. @OETestDepends(['ping.PingTest.test_ping'])
  6. @OEHasPackage(['dropbear', 'openssh-sshd'])
  7. def test_ssh(self):
  8. (status, output) = self.target.run('uname -a')
  9. self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
  10. (status, output) = self.target.run('cat /etc/masterimage')
  11. msg = "This isn't the right image - /etc/masterimage " \
  12. "shouldn't be here %s" % output
  13. self.assertEqual(status, 1, msg=msg)