Actions
Bug #13941
closedCore tests should not print API deprecation warnings
Description
Many core functional tests print API deprecation warnings when testing deprecated API controllers, actions and parameters.
These Foreman::Deprecation.api_deprecation_warning calls should be expected in the tests so a) they don't clutter rake test output, and b) deprecation tests verify they're being logged too.
API v1 routes:
- DEPRECATION WARNING: Your API call uses deprecated behavior, Config templates were renamed to provisioning templates. (called from deprecated at /home/dcleal/code/foreman/foreman/app/controllers/api/v1/config_templates_controller.rb:98)
- DEPRECATION WARNING: Your API call uses deprecated behavior, Reports were renamed to ConfigReports. (called from deprecated at /home/dcleal/code/foreman/foreman/app/controllers/api/v1/reports_controller.rb:48)
API v2 routes:
- DEPRECATION WARNING: Your API call uses deprecated behavior, The resources /config_templates were moved to /provisioning_templates. Please use the new path instead. (called from deprecated at /home/dcleal/code/foreman/foreman/app/controllers/api/v2/config_templates_controller.rb:122)
- DEPRECATION WARNING: Your API call uses deprecated behavior, The resources /reports were moved to /config_reports. Please use the new path instead. (called from deprecated at /home/dcleal/code/foreman/foreman/app/controllers/api/v2/reports_controller.rb:66)
- DEPRECATION WARNING: Your API call uses deprecated behavior, The /status route is deprecated, please use the new /status/configuration instead. (called from status at /home/dcleal/code/foreman/foreman/app/controllers/api/v2/hosts_controller.rb:142)
Parameter checks:
- DEPRECATION WARNING: Your API call uses deprecated behavior, Field host_parameters_attributes.nested ignored. (called from block in check_create_host_nested at /home/dcleal/code/foreman/foreman/app/controllers/concerns/api/compatibility_checker.rb:9)
- DEPRECATION WARNING: Your API call uses deprecated behavior, Config templates were renamed to provisioning templates. (called from rename_config_template at /home/dcleal/code/foreman/foreman/app/controllers/api/v2/template_combinations_controller.rb:82)
Deprecation warning tests:
- DEPRECATION WARNING: You are using a deprecated behavior, it will be removed in version 1.9, More info. (called from block in <class:ForemanDeprecationTest> at /home/dcleal/code/foreman/foreman/test/unit/foreman_deprecation_test.rb:5)
- DEPRECATION WARNING: Your API call uses deprecated behavior, More info. (called from block (2 levels) in <class:ForemanDeprecationTest> at /home/dcleal/code/foreman/foreman/test/unit/foreman_deprecation_test.rb:19)
Actions