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