Actions
Refactor #13039
closedRemove DB queries from class of UnattendedController
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Description
UnattendedController makes DB queries for TemplateKinds in the class scope to define methods and set up action filters. This bad style causes a problem in foreman_bootdisk which adds a method chain to the provision method in the class. When running tests under Rails 4, if the controller's instantiated too early, the right methods aren't defined.
4) Error: UnattendedControllerTest#test_0002_should get a kickstart even if not using the first NIC: AbstractController::ActionNotFound: The action 'provision' could not be found for UnattendedController test/functional/unattended_controller_test.rb:43:in `block in <class:UnattendedControllerTest>'
Changing this to make queries when it's called would create more testable code both in core and the plugin.
Updated by The Foreman Bot almost 9 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/3029 added
Updated by Dominic Cleal almost 9 years ago
- Translation missing: en.field_release set to 71
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset b1997f520137128b9f1939437c62c8c0543acb5c.
Updated by Dominic Cleal almost 9 years ago
- Related to Refactor #13409: Remove maintain_test_schema! Rails initializer added
Updated by Dominic Cleal over 8 years ago
- Related to Bug #15490: CVE-2016-4995 - view_hosts permissions/filters not checked for provisioning template previews added
Updated by Dominic Cleal over 8 years ago
- Related to Bug #10689: Unattended controller permission check does not work added
Actions