Actions
Bug #9252
closedFunctional tests failing against develop
Description
http://ci.theforeman.org/job/test_plugin_foreman_bootdisk/ has been failing for a couple of weeks:
1) Failure: test_0001_should generate host image(ForemanBootdisk::Api::V2::DisksControllerTest::#host) [/var/lib/workspace/workspace/test_plugin/plugin/test/functional/foreman_bootdisk/api/v2/disks_controller_test.rb:21]: Expected response to be a <:success>, but was <500> 2) Error: test_0001_should generate host image(ForemanBootdisk::DisksControllerTest::#host): ActionController::RedirectBackError: No HTTP_REFERER was set in the request to this action, so redirect_to :back could not be called successfully. If this is a test, make sure to specify request.env["HTTP_REFERER"]. /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/redirecting.rb:100:in `_compute_redirect_to_location' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/turbolinks-2.5.3/lib/turbolinks/xhr_headers.rb:21:in `_compute_redirect_to_location' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/redirecting.rb:74:in `redirect_to' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/flash.rb:25:in `redirect_to' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:60:in `block in redirect_to' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:59:in `redirect_to' /var/lib/workspace/workspace/test_plugin/plugin/app/controllers/foreman_bootdisk/disks_controller.rb:27:in `rescue in host' /var/lib/workspace/workspace/test_plugin/plugin/app/controllers/foreman_bootdisk/disks_controller.rb:23:in `host' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/implicit_render.rb:4:in `send_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:167:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/rendering.rb:10:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:18:in `block in process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:638:in `block (4 levels) in _run__2646386524352391130__process_action__3575317476637879674__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7407' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_2215' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7407' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:626:in `block (3 levels) in _run__2646386524352391130__process_action__3575317476637879674__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7406' /var/lib/workspace/workspace/test_plugin/foreman/app/controllers/concerns/application_shared.rb:13:in `set_timezone' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7406' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:625:in `block (2 levels) in _run__2646386524352391130__process_action__3575317476637879674__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7405' /var/lib/workspace/workspace/test_plugin/foreman/app/models/concerns/foreman/thread_session.rb:33:in `clear_thread' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7405' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:448:in `block in _run__2646386524352391130__process_action__3575317476637879674__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:215:in `block in _conditional_callback_around_7404' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:326:in `around' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:310:in `_callback_around_13' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:214:in `_conditional_callback_around_7404' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:414:in `_run__2646386524352391130__process_action__3575317476637879674__callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:405:in `__run_callback' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:385:in `_run_process_action_callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/callbacks.rb:81:in `run_callbacks' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/abstract_controller/callbacks.rb:17:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/rescue.rb:29:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:30:in `block in process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `block in instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activesupport-3.2.21/lib/active_support/notifications.rb:123:in `instrument' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/instrumentation.rb:29:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/params_wrapper.rb:207:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/activerecord-3.2.21/lib/active_record/railties/controller_runtime.rb:18:in `process_action' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/abstract_controller/base.rb:121:in `process' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/abstract_controller/rendering.rb:45:in `process' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/metal/testing.rb:17:in `process_with_new_base_test' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/test_case.rb:490:in `process' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/apipie-rails-0.2.6/lib/apipie/extractor/recorder.rb:118:in `process_with_api_recording' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/test_case.rb:54:in `process' /usr/local/rvm/gems/ruby-1.9.3-p392@test_plugin-0/gems/actionpack-3.2.21/lib/action_controller/test_case.rb:407:in `get' /var/lib/workspace/workspace/test_plugin/plugin/test/functional/foreman_bootdisk/disks_controller_test.rb:20:in `block (2 levels) in <class:DisksControllerTest>'
Updated by Tom Caspy over 9 years ago
the test fails because the template tries to find the host's IP address using the Host#ip method (which no longer works)
I don't know the rewrite well enough to solve this properly (without breaking the plugin for previous versions of foreman)
I hope that the reason for the failure will save the next guy some time :)
Updated by Dominic Cleal over 9 years ago
Don't worry about compatibility with old versions, it's fine if it works against develop only.
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_bootdisk/pull/7 added
- Pull request deleted (
)
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset foreman_bootdisk|3da444ba1c1088296e01216941db204c6eebb7d6.
Actions