blob: 0b1ea7bcc25100fe7b0eac0294d0428b9d8c33e9 [file] [log] [blame]
Brad Bishop6e60e8b2018-02-01 10:27:11 -05001from oeqa.runtime.case import OERuntimeTestCase
2from oeqa.core.decorator.depends import OETestDepends
3from oeqa.core.decorator.oeid import OETestID
Brad Bishop977dc1a2019-02-06 16:01:43 -05004from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005
6class SSHTest(OERuntimeTestCase):
7
8 @OETestID(224)
9 @OETestDepends(['ping.PingTest.test_ping'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050010 @OEHasPackage(['dropbear', 'openssh-sshd'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 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)