Actions
Bug #19362
closedhammer-cli-foreman tests fail with rest-client < 2.0.0
Status:
Closed
Priority:
Normal
Assignee:
Category:
Hammer core
Target version:
Difficulty:
Triaged:
Team Backlog:
Marek
Description
Customizing of error messages by authenticator works only with rest-client >= 2.0.0
Exception class in earlier versions of rest-client prevents that.
To reproduce enforce rest-client < 2.0.0 in the bundle env and run the tests.
$ bundle exec rake test TEST=test/unit/api/interactive_basic_auth_test.rb /usr/bin/ruby -I"lib:lib" -I"/home/mbacovsk/.gem/ruby/gems/rake-10.1.1/lib" "/home/mbacovsk/.gem/ruby/gems/rake-10.1.1/lib/rake/rake_test_loader.rb" "test/unit/api/interactive_basic_auth_test.rb" Run options: --seed 45861 # Running tests: F........ Finished tests in 0.005473s, 1644.3011 tests/s, 1827.0013 assertions/s. 1) Failure: HammerCLIForeman::Api::InteractiveBasicAuth::#error#test_0001_overrides exception message for unauthorized exception [/home/mbacovsk/work/theforeman/Hammer/hammer-cli-foreman/test/unit/api/interactive_basic_auth_test.rb:77]: Expected: "Invalid username or password" Actual: "Unauthorized" 9 tests, 10 assertions, 1 failures, 0 errors, 0 skips Coverage report generated for MiniTest to /home/mbacovsk/work/theforeman/Hammer/coverage. 2489 / 5119 LOC (48.62%) covered. rake aborted! Command failed with status (1): [ruby -I"lib:lib" -I"/home/mbacovsk/.gem/ruby/gems/rake-10.1.1/lib" "/home/mbacovsk/.gem/ruby/gems/rake-10.1.1/lib/rake/rake_test_loader.rb" "test/unit/api/interactive_basic_auth_test.rb" ] Tasks: TOP => test (See full trace by running task with --trace)
Actions