Patch #30276

Add missing fixtures to several tests

Added by Yuichi HARADA 26 days ago. Updated 12 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Code cleanup/refactoring
Target version:4.1.0

Description

Even with the same test, sometimes it may failure. I confirmed it with the following bash script.

for file in `find test -name "*.rb"`; do
  RAILS_ENV=test bundle exec rake db:reset
  bundle exec rake test TEST=$file
done

The tests for which the fixture was missing were the following.

Test file Missing fixtures
test/unit/lib/redmine/field_format/version_field_format_test.rb :enabled_modules
test/unit/custom_field_test.rb :users
test/unit/journal_observer_test.rb :members, :member_roles
test/unit/project_copy_test.rb :attachments
test/unit/repository_test.rb :user_perferences, :watchers
test/functional/calendars_controller_test.rb :users, :email_addresses
test/functional/gantts_controller_test.rb :email_addresses
test/functional/news_controller_test.rb :user_perferences

I made a patch, and attach it.

missing-fixtures-v3.patch Magnifier (8.67 KB) Yuichi HARADA, 2018-12-26 08:12

Associated revisions

Revision 17780
Added by Go MAEDA 12 days ago

Add missing fixtures to several tests (#30276).

Patch by Yuichi HARADA.

History

#1 Updated by Yuichi HARADA 26 days ago

P.S. Since I'm using SQLite, skipping tests specific to MySQL or PostgreSQL will be skipped.

#2 Updated by Yuichi HARADA 26 days ago

  • File missing-fixtures-v2.patch added

I did not attach a test file to the patch.

Test file Missing fixtures
test/functional/welcome_controller_test.rb :roles, :member_roles, :enabled_modules

I rebuilt a patch.
Please delete the previous patch. (missing-fixtures.patch)

#3 Updated by Yuichi HARADA 26 days ago

I added a test file to the patch again.

Test file Missing fixtures
test/functional/settings_controller_test.rb :email_addresses

Please delete the previous patch. (missing-fixtures-v2.patch)

#4 Updated by Marius BALTEANU 25 days ago

  • File deleted (missing-fixtures-v2.patch)

#5 Updated by Marius BALTEANU 25 days ago

  • File deleted (missing-fixtures.patch)

#6 Updated by Go MAEDA 25 days ago

  • Category set to Code cleanup/refactoring
  • Target version set to 4.1.0

Thank you for deeply investigating the issue. I confirmed that the patch fixes test failures.

Setting the target version to 4.1.0.

#7 Updated by Go MAEDA 12 days ago

  • Subject changed from Test failure by missing fixtures to Add missing fixtures to several tests
  • Status changed from New to Closed
  • Assignee set to Go MAEDA

Committed. Thanks.

Also available in: Atom PDF