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