Actions
Refactor #16220
closedReplace skip_callback in factories with stubbing
Description
Compute resource factories currently call skip_callback
on compute resources classes when constructing instances to disable contact with the CR, key generation, e.g.
after(:build) { |host| host.class.skip_callback(:create, :after, :setup_key_pair) }
On Rails 5.0, calling skip_callback for a non-existent callback now raises an error by default, so when this is called twice on the same class, it will fail the second time as the callback's been deleted.
To prevent modifying the class itself, the methods should be stubbed like other factories so that the callbacks are run, but have no effect.
Updated by The Foreman Bot over 8 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3757 added
Updated by Dominic Cleal over 8 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 8563088e6846876ea70ffd0a55c768feab01a589.
Updated by Dominic Cleal over 8 years ago
- Translation missing: en.field_release set to 160
Actions