Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1 | from oeqa.runtime.case import OERuntimeTestCase |
| 2 | from oeqa.core.decorator.depends import OETestDepends |
| 3 | from oeqa.core.decorator.oeid import OETestID |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 4 | from oeqa.runtime.decorator.package import OEHasPackage |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 5 | |
| 6 | class SSHTest(OERuntimeTestCase): |
| 7 | |
| 8 | @OETestID(224) |
| 9 | @OETestDepends(['ping.PingTest.test_ping']) |
Brad Bishop | 977dc1a | 2019-02-06 16:01:43 -0500 | [diff] [blame] | 10 | @OEHasPackage(['dropbear', 'openssh-sshd']) |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 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) |