Changes: Broken tests Fixed

RevBy: Antti Kervinen
Details: 1. Test launch_wo_applauncherd fixed. Now the applications cannot be launched
            if applauncherd is not running.
         2. One of the unit test is started as user.
pull/1/head
Nimika Keshri 15 years ago
parent 63c986d92f
commit c350cfa520

@ -39,7 +39,7 @@
</case>
<case name="MBooster" type="Functional" description="Unit tests for MBooster class" level="Component" timeout="20">
<step expected_result="0">source /tmp/session_bus_address.user &amp;&amp; DISPLAY=:0 /usr/share/applauncherd-tests/ut_mbooster</step>
<step expected_result="0">su - user -c 'source /tmp/session_bus_address.user &amp;&amp; DISPLAY=:0 /usr/share/applauncherd-tests/ut_mbooster'</step>
</case>
<case name="QtBooster" type="Functional" description="Unit tests for QtBooster class" level="Component" timeout="20">

@ -459,19 +459,18 @@ class launcher_tests (unittest.TestCase):
def test_launch_wo_applauncherd(self):
"""
To Test that invoker can launch applications even when the
To Test that invoker cannot launch applications when the
applauncherd is not running
"""
stop_applauncherd()
handle = run_app_as_user('fala_ft_hello')
st, op = commands.getstatusoutput('su - user -c fala_ft_hello')
time.sleep(3)
pid1 = get_pid('fala_ft_hello')
self.assert_(pid1 != None, "Application wasn't executed")
kill_process('fala_ft_hello')
self.assert_(pid1 == None, "Application was executed")
self.assert_(op.split('\n')[2] == "invoker: warning: Failed to initiate connect on the socket.", "Application was executed")
start_applauncherd()

@ -75,7 +75,7 @@
</case>
<case name="applauncherd__test_launch_wo_applauncherd" type="Functional" description="Test invoker can launch applications even when applauncherd is not running" timeout="360" level="System" insignificant="false">
<case name="applauncherd__test_launch_wo_applauncherd" type="Functional" description="Test invoker cannot launch applications when applauncherd is not running" timeout="360" level="System" insignificant="false">
<step expected_result="0">source /tmp/session_bus_address.user; DISPLAY=:0 `pyversions -d` /usr/share/applauncherd-testscripts/test-func-launcher.py test_launch_wo_applauncherd</step>
</case>

Loading…
Cancel
Save