Changes: Adds test for bug #291089 "Installation of clock application fails when applauncherd daemon stopped"

RevBy: Thyagarajan Balakrishnan <ext-thyagarajan.1.balakrishnan@nokia.com>
pull/1/head
Marek Ruszczak 14 years ago
parent b55d3f50f4
commit 6efe9e255e

@ -106,6 +106,14 @@
insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-security.py test_that_other_apps_dont_gain_new_token</step>
</case>
<case name="applauncherd__test_installation_of_new_token_when_deamon_is_disabled"
type="Functional"
description="Test that isntallation of new package with new security token is going well when applauncherd daemon is disabled (stoped)"
timeout="200"
level="System"
insignificant="true">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-security.py test_installation_of_new_token_when_deamon_is_disabled</step>
</case>
<post_steps>
<step>initctl start xsession/pkgm-timed-checks</step>
</post_steps>

@ -526,7 +526,29 @@ class SecurityTests(unittest.TestCase):
kill_process(appName)
self.__test_reexec_remove_test_package(packageName)
def test_installation_of_new_token_when_deamon_is_disabled(self):
"""
Test that isntallation of new package with new security token is going well
when applauncherd daemon is disabled (stoped).
"""
packageFileName = '/usr/share/fala_images/applauncherd-token-test_1.0_armel.deb'
packageName = 'applauncherd-token-test'
st = stop_applauncherd()
self.assertEqual(st, 0, "Fail to stop service 'xsession/applauncherd'. Error code: %s " %(st))
debug ("Service 'xsession/applauncherd' has been stoped.")
try :
debug('Installing test packege "%s"...' %(packageName))
st, op = commands.getstatusoutput('dpkg -i %s' %(packageFileName))
self.assertEqual(st, 0, 'Installation of "%s" failed see:\n%s' %(packageName, op))
debug('...Instalation was successful.')
self.__test_reexec_remove_test_package(packageName)
finally :
self.assert_(start_applauncherd(), "Fail to restore service 'xsession/applauncherd'")
# main
if __name__ == '__main__':

Loading…
Cancel
Save