Project

General

Profile

Refactor #12099

Template locked? relying on rake makes tests fail

Added by Daniel Lobato Garcia about 4 years ago. Updated over 1 year ago.

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

Description

app/models/template.rb has a method locked? that relies on !Foreman.in_rake? to bypass the locked validation when running some operations through Rake such as migrations or cloning templates. On Rails 4 rake test is also interpreted as being 'in rake' and tests fail when running them through rake test but not when running template tests individually.


Related issues

Related to Foreman - Tracker #3157: Rails 4.1 upgrade tasksClosed2013-09-27

Associated revisions

Revision 1cff2424 (diff)
Added by Daniel Lobato Garcia about 4 years ago

Fixes #12099 - Template locked? relying on rake makes tests fail

app/models/template.rb has a method locked? that relies on
!Foreman.in_rake? to bypass the locked validation when running some
operations through Rake such as migrations or cloning templates. On
Rails 4 rake test is also interpreted as being 'in rake' and tests fail
when running them through rake test but not when running template tests
individually.

History

#1 Updated by Daniel Lobato Garcia about 4 years ago

#2 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2797 added
  • Pull request deleted ()

#3 Updated by Dominic Cleal about 4 years ago

  • Status changed from Ready For Testing to Rejected

PR closed.

#4 Updated by Dominic Cleal about 4 years ago

  • Status changed from Rejected to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/2834 added
  • Pull request deleted (https://github.com/theforeman/foreman/pull/2797)

New PR opened.

#5 Updated by Dominic Cleal about 4 years ago

  • Legacy Backlogs Release (now unused) set to 71

#6 Updated by Daniel Lobato Garcia about 4 years ago

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

Also available in: Atom PDF