blob: e31224b3afddb99097ea0c61442342111d0e3b3b [file] [log] [blame]
Brad Bishopc342db32019-05-15 21:57:59 -04001#
2# SPDX-License-Identifier: MIT
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005from oeqa.runtime.case import OERuntimeTestCase
6from oeqa.core.decorator.depends import OETestDepends
Brad Bishop977dc1a2019-02-06 16:01:43 -05007from oeqa.runtime.decorator.package import OEHasPackage
Brad Bishop6e60e8b2018-02-01 10:27:11 -05008
9class SSHTest(OERuntimeTestCase):
10
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011 @OETestDepends(['ping.PingTest.test_ping'])
Brad Bishop977dc1a2019-02-06 16:01:43 -050012 @OEHasPackage(['dropbear', 'openssh-sshd'])
Brad Bishop6e60e8b2018-02-01 10:27:11 -050013 def test_ssh(self):
14 (status, output) = self.target.run('uname -a')
15 self.assertEqual(status, 0, msg='SSH Test failed: %s' % output)
Andrew Geissler7e0e3c02022-02-25 20:34:39 +000016 (status, output) = self.target.run('cat /etc/controllerimage')
17 msg = "This isn't the right image - /etc/controllerimage " \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050018 "shouldn't be here %s" % output
19 self.assertEqual(status, 1, msg=msg)