プロジェクト

全般

プロフィール

Vote #79727

完了

Add missing fixtures to several tests

Admin Redmine さんが3年以上前に追加. 3年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Code cleanup/refactoring_30
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
30
version_id:
127
issue_org_id:
30276
author_id:
362529
assigned_to_id:
332
comments:
7
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

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.


journals

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

--------------------------------------------------------------------------------
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)
--------------------------------------------------------------------------------
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)
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

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

Setting the target version to 4.1.0.
--------------------------------------------------------------------------------
Committed. Thanks.
--------------------------------------------------------------------------------

Admin Redmine さんが3年以上前に更新

  • カテゴリCode cleanup/refactoring_30 にセット
  • 対象バージョン4.1.0_127 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0