Actions
Bug #6962
closedLoad usergroup admin user from fixtures directly to avoid a katello issue in tests
Difficulty:
trivial
Triaged:
Pull request:
Description
Currently when running the foreman core tests with katello enabled, the UsergroupMemberTests fail with this:
undefined method `remote_id' for nil:NilClass (NoMethodError)
/var/lib/workspace/workspace/test_katello_core_gsutcliffe/database/postgresql/ruby/1.9.3/plugin/app/lib/actions/middleware/remote_action.rb:21:in `block in plan'
/var/lib/workspace/workspace/test_katello_core_gsutcliffe/database/postgresql/ruby/1.9.3/plugin/app/lib/actions/middleware/remote_action.rb:21:in `tap'
/var/lib/workspace/workspace/test_katello_core_gsutcliffe/database/postgresql/ruby/1.9.3/plugin/app/lib/actions/middleware/remote_action.rb:21:in `plan'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware/stack.rb:22:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware/stack.rb:26:in `pass'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware.rb:16:in `pass'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware.rb:29:in `plan'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware/stack.rb:22:in `call'
/usr/local/rvm/gems/ruby-1.9.3-p392@test_katello_core_gsutcliffe-3/gems/dynflow-0.7.2/lib/dynflow/middleware/world.rb:30:in `execute'
...
It seems that changing the tests to use `users(:admin)` fixes the problem, and is a cleaner use of fixtures anyway.
Updated by Greg Sutcliffe over 10 years ago
As per Dominic's suggestion, I'm actually refactoring these tests to use =as_admin= where appropriate.
Updated by The Foreman Bot over 10 years ago
- Status changed from Assigned to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/1657 added
- Pull request deleted (
)
Updated by Greg Sutcliffe over 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset 28fd090c8d135347b54725291434ee2e3b5edbad.
Actions