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.
Actions