1c342db35SBrad Bishop# 2c342db35SBrad Bishop# SPDX-License-Identifier: MIT 3c342db35SBrad Bishop# 4c342db35SBrad 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) 16*7e0e3c0cSAndrew Geissler (status, output) = self.target.run('cat /etc/controllerimage') 17*7e0e3c0cSAndrew Geissler msg = "This isn't the right image - /etc/controllerimage " \ 18eb8dc403SDave Cobbley "shouldn't be here %s" % output 19eb8dc403SDave Cobbley self.assertEqual(status, 1, msg=msg) 20