Project

General

Profile

Actions

Patch #4572

closed

Make it harder to ruin your database

Added by Alexey Palazhchenko about 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Start date:
2010-01-13
Due date:
% Done:

100%

Estimated time:

Description

New Rails apps have
ENV["RAILS_ENV"] = "test"
in test_helper.rb.

You have
ENV["RAILS_ENV"] ||= "test"

Good I have backups. :)

Please add this line:
abort "Preventing you from running tests in '#{ENV['RAILS_ENV']}' environment." unless ENV["RAILS_ENV"] =~ /^test/

Actions #1

Updated by Eric Davis over 13 years ago

  • Status changed from New to Closed
  • Assignee set to Eric Davis
  • Target version set to 1.0.0 (RC)
  • % Done changed from 0 to 100

I've updated test_helper.rb in r3840 to force the test environment.

Actions #2

Updated by Alexey Palazhchenko over 13 years ago

  • Status changed from Closed to Reopened
  • % Done changed from 100 to 50

Eric, I think you forgot about test_pgsql and test_sqlite3… That's why I'm regexp.

Actions #3

Updated by Eric Davis over 13 years ago

  • Status changed from Reopened to Closed
  • % Done changed from 50 to 100

Alexey Palazhchenko wrote:

Eric, I think you forgot about test_pgsql and test_sqlite3… That's why I'm regexp.

I don't like having those extra environments and want to remove them in a future version.

Actions #4

Updated by xt zhang over 13 years ago

Eric Davis wrote:

Alexey Palazhchenko wrote:

Eric, I think you forgot about test_pgsql and test_sqlite3… That's why I'm regexp.

I don't like having those extra environments and want to remove them in a future version.

Does this mean that in a future version Redmine support mysql only?

Actions #5

Updated by Alexey Palazhchenko over 13 years ago

xt zhang wrote:

Does this mean that in a future version Redmine support mysql only?

Definitely not. MySQL, PostgreSQL and SQLite3 will be supported in foreseeable future.

Actions #6

Updated by Eric Davis over 13 years ago

xt zhang wrote:

Does this mean that in a future version Redmine support mysql only?

Not at all, only that I'd like to remove the duplicate test environments in the future. I run my Redmine on Postgres, I have clients running on MySQL and Postgres, and I use SQLite3 for testing.

Actions

Also available in: Atom PDF