[yast-devel] WebYaST - webservice - failing functional tests in plugins
Hi all,
I have found that many functional tests in webservice plugins fails.
The reason is that PERMISSION_CHECK_TESTING in permission_check
function has been removed. (see commit 1e3ac993a336)
If your functional test fails with error:
permission_check1: User does not exist, #
* Ladislav Slezak
Hi all,
I have found that many functional tests in webservice plugins fails.
The reason is that PERMISSION_CHECK_TESTING in permission_check function has been removed. (see commit 1e3ac993a336)
Oops, my bad. I only ran the webservice test cases but not those of the plugins.
If your functional test fails with error:
permission_check1: User does not exist, #
then add this stub into the test setup function:
PolKit.stubs(:polkit_check).with('org.opensuse.yast.system.FOO', 'test_user').returns(:yes)
Let me try to come up with a more generic solution. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Klaus Kaempf
* Ladislav Slezak
[Apr 15. 2010 11:33]: If your functional test fails with error:
permission_check1: User does not exist, #
then add this stub into the test setup function:
PolKit.stubs(:polkit_check).with('org.opensuse.yast.system.FOO', 'test_user').returns(:yes)
Let me try to come up with a more generic solution.
This solution is in place now. Every test includes the generic test_helper from its 'rails parent' thereby disabling PolKit.polkit_check Only the testcase testing polkit_check overrides this disabling. While I were at it I also cleaned up repetitive lines in 'Rakefile'. All the common stuff is in webservice/lib/tasks/common.rb now, making the plugin Rakefiles much shorter now. Enjoy, Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
Dne 15.4.2010 13:56, Klaus Kaempf napsal(a): [...]
While I were at it I also cleaned up repetitive lines in 'Rakefile'. All the common stuff is in webservice/lib/tasks/common.rb now, making the plugin Rakefiles much shorter now.
Great! I have added some code to the shared test_helper.rb (needed for running tests during RPM build). It's great to add it just once and not in each plugin separately. Thanks! -- Best Regards Ladislav Slezák Yast Developer ------------------------------------------------------------------------ SUSE LINUX, s.r.o. e-mail: lslezak@suse.cz Lihovarská 1060/12 tel: +420 284 028 960 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http://www.suse.cz/ -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Ladislav Slezak
Dne 15.4.2010 13:56, Klaus Kaempf napsal(a): [...]
While I were at it I also cleaned up repetitive lines in 'Rakefile'. All the common stuff is in webservice/lib/tasks/common.rb now, making the plugin Rakefiles much shorter now.
Great!
I have added some code to the shared test_helper.rb (needed for running tests during RPM build). It's great to add it just once and not in each plugin separately. Thanks!
Glad you like it :-) Now a similar cleanup is due for the web-client side. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
* Klaus Kaempf
Now a similar cleanup is due for the web-client side.
Its done ! All web-client plugins now share the test_helper and the Rakefile with their parent. Klaus --- SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg) -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org
participants (2)
-
Klaus Kaempf
-
Ladislav Slezak