Project

General

Profile

Bug #23954

Tests stub controller to return Foreman::Task instead of a Dynlfow task, causing error

Added by Stephen Benjamin about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Category:
Tests
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

With yesterday's release of foreman-tasks, tests are now erroring:


Failure:
Katello::Api::V2::RepositoriesControllerTest#test_remove_content [/var/lib/workspace/workspace/katello-pr-test/test/controllers/api/v2/repositories_controller_test.rb:701]:
Expected response to be a <2XX: success>, but was a <500: Internal Server Error>
Response body: {"displayMessage":"undefined method `get_humanized' for #\u003cForemanTasks::Task:0x0000000077384470\u003e\nDid you mean?  humanized","errors":["undefined method `get_humanized' for #\u003cForemanTasks::Task:0x0000000077384470\u003e\nDid you mean?  humanized"]}

bin/rails test /var/lib/workspace/workspace/katello-pr-test/test/controllers/api/v2/repositories_controller_test.rb:694

Associated revisions

Revision a333a273 (diff)
Added by Stephen Benjamin about 3 years ago

fixes #23954 - test stubs should return dynflow task

ForemanTask.async_task returns a dynflow task, and tests that stub this
should also return the same class of object. ForemanTask::Task doesn't
have all the same methods as Task::DynflowTask, e.g. get_humanized.

History

#1 Updated by The Foreman Bot about 3 years ago

  • Assignee set to Stephen Benjamin
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello/pull/7458 added

#2 Updated by Stephen Benjamin about 3 years ago

  • % Done changed from 0 to 100
  • Status changed from Ready For Testing to Closed

#3 Updated by Jonathon Turel about 3 years ago

  • Legacy Backlogs Release (now unused) set to 338

Also available in: Atom PDF