Mailinglist Archive: yast-devel (246 mails)
| < Previous | Next > |
[yast-devel] WebYaST - broken 'test' mode setup in webservice plugin testsuites
- From: Ladislav Slezak <lslezak@xxxxxxx>
- Date: Fri, 21 Aug 2009 09:47:04 +0200
- Message-id: <4A8E50F8.40201@xxxxxxx>
I wanted to fix test-unit reloading when script/server finishes and
I have found that mode 'test' is set quite late in plugin testsuites,
after environment.rb is loaded.
For this reason test ENV['RAILS_ENV'] == 'test' doesn't work there.
The problem is in test_helper.rb files in plugins:
# first config rails
require File.expand_path(rails_parent + "/config/environment")
# then enable testing, this will get the routing right
ENV["RAILS_ENV"] = "test"
When environment.rb is loaded the setup is:
ENV["RAILS_ENV"] = nil
RAILS_ENV = 'development'
Jozef, this could be the reason why the host testsuite sometimes writes to
the development DB during testing...
I have fixed this problem in web-client and it's plugins,
the webservice packages require more effort, because routing is set there.
Reported as bug #533178
--
Best Regards
Ladislav Slezák
Yast Developer
------------------------------------------------------------------------
SUSE LINUX, s.r.o. e-mail: lslezak@xxxxxxx
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@xxxxxxxxxxxx
For additional commands, e-mail: yast-devel+help@xxxxxxxxxxxx
| < Previous | Next > |