Project

General

Profile

Actions

Bug #6620

closed

Allow plugins to include test setup code in the test_helper

Added by Eric Helms almost 10 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Tests
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:
Actions #1

Updated by The Foreman Bot almost 10 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.8.0
  • Pull request https://github.com/theforeman/foreman/pull/1587 added
  • Pull request deleted ()
Actions #2

Updated by Anonymous over 9 years ago

  • Target version changed from 1.8.0 to 1.7.5
Actions #3

Updated by Eric Helms over 9 years ago

In some cases, a plugin may modifies or changes core Foreman behaviors such that for the Foreman tests to run in the context of the plugin some setup code may need to be run before the test suites. In Katello currently, if the Foreman unit tests are run there are a number of errors thrown about "running a dynflow action in a transaction" which can be squelched by including the following in the test helper via this functionality:

Organization.class_eval do
def ensure_not_in_transaction!
end

def execute_planned_action
end
end

User.class_eval do
def ensure_not_in_transaction!
end

def execute_planned_action
end
end
Actions #4

Updated by Dominic Cleal over 9 years ago

  • translation missing: en.field_release set to 10
Actions #5

Updated by Eric Helms over 9 years ago

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

Also available in: Atom PDF