Refactor #19131

Unpin minitest to permit later 5.x

Added by Dominic Cleal 10 months ago. Updated 3 months ago.

Status:Closed
Priority:Normal
Assigned To:Dominic Cleal
Category:Tests
Target version:-
Difficulty: Bugzilla link:
Found in release: Pull request:https://github.com/theforeman/foreman/pull/4432
Story points-
Velocity based estimate-
Release1.16.0Release relationshipAuto

Description

minitest was pinned to 5.1.x during #7230, the upgrade to Ruby on Rails 4.1. The exact reason is unclear (https://github.com/theforeman/foreman/pull/2870#discussion-diff-43727271).

It can be upgraded, but may require some changes to incorrect tests and fixes for deprecation warnings issued for Minitest 6 (e.g. assert_equal nil, [..] should be assert_nil).


Related issues

Related to Foreman Remote Execution - Bug #19360: Tests are failling with newest mintest Closed 04/24/2017

Associated revisions

Revision edd5310f
Added by Dominic Cleal 9 months ago

fixes #19131 - upgrade minitest to latest 5.x

- override minitest's `_` expectation method with the gettext method
- rename `location` let helper, conflicted with a minitest method name
- fix `assert_equal nil, [..]` deprecation warnings, prefer `assert nil`

Contains fixes for tests that leak data or behavioral changes between
tests, as the ordering of test cases is now randomised:

- remove Host/Nic class modifications in orchestration concern test
- move NotificationBlueprint seeding into test transaction, preventing
DB truncation in integration tests from removing the records
- ensure DBCleaner.start is called when in transaction mode to prevent
records leaking out of integration tests
- sort records for reliable comparisons in TaxonomyTest
- move IPs of BMC NIC factory objects to 1.0.0.0/8 to avoid duplicates
- remove duplicate SettingTest cache clear, missing rescue

History

#1 Updated by The Foreman Bot 10 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/4432 added

#2 Updated by Dominic Cleal 9 months ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

#3 Updated by Ivan Necas 9 months ago

  • Related to Bug #19360: Tests are failling with newest mintest added

#4 Updated by Marek Hulán 3 months ago

  • Release set to 1.16.0

Also available in: Atom PDF