Mailinglist Archive: opensuse-bugs (6633 mails)

< Previous Next >
[Bug 533178] New: webservice - broken test mode setup in plugin testsuites
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Fri, 21 Aug 2009 01:44:36 -0600
  • Message-id: <bug-533178-21960@xxxxxxxxxxxxxxxxxxxxxxxx/>

Summary: webservice - broken test mode setup in plugin
Classification: openSUSE
Product: openSUSE 11.2
Version: Factory
Platform: Other
OS/Version: Other
Status: NEW
Severity: Major
Priority: P5 - None
Component: WebYaST
AssignedTo: kkaempf@xxxxxxxxxx
ReportedBy: lslezak@xxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---

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 in environment.rb

The problem is in test_helper.rb file 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'

This could be the reason why the host testsuite sometimes writes to
the development DB during testing...

I have fixed the same problem in web-client and it's plugins,
the webservice packages require more effort, because routing is set at the and
of environment.rb, changing mode to 'test' breaks the routing setup in plugins
and all testsuites fail.

Klaus, git blame tells that you are the author of the routing setup in

Configure bugmail:
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >
Follow Ups