1*c342db35SBrad Bishop# 2*c342db35SBrad Bishop# SPDX-License-Identifier: MIT 3*c342db35SBrad Bishop# 4*c342db35SBrad Bishop 5eb8dc403SDave Cobbleyfrom oeqa.runtime.case import OERuntimeTestCase 6eb8dc403SDave Cobbleyfrom oeqa.core.decorator.depends import OETestDepends 7977dc1acSBrad Bishopfrom oeqa.runtime.decorator.package import OEHasPackage 8eb8dc403SDave Cobbley 9eb8dc403SDave Cobbleyclass SSHTest(OERuntimeTestCase): 10eb8dc403SDave Cobbley 11eb8dc403SDave Cobbley @OETestDepends(['ping.PingTest.test_ping']) 12977dc1acSBrad Bishop @OEHasPackage(['dropbear', 'openssh-sshd']) 13eb8dc403SDave Cobbley def test_ssh(self): 14eb8dc403SDave Cobbley (status, output) = self.target.run('uname -a') 15eb8dc403SDave Cobbley self.assertEqual(status, 0, msg='SSH Test failed: %s' % output) 16eb8dc403SDave Cobbley (status, output) = self.target.run('cat /etc/masterimage') 17eb8dc403SDave Cobbley msg = "This isn't the right image - /etc/masterimage " \ 18eb8dc403SDave Cobbley "shouldn't be here %s" % output 19eb8dc403SDave Cobbley self.assertEqual(status, 1, msg=msg) 20