Project

General

Profile

Bug #14228

running single test fails due to FileUtils not being required

Added by Tom Caspy over 3 years ago. Updated about 1 year ago.

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


Related issues

Related to Foreman - Bug #14097: Only run DatabaseCleaner as 'truncation' on JS testsClosed2016-03-08

Associated revisions

Revision 86aa4085 (diff)
Added by Ori Rabin over 3 years ago

Fixes #14228 - requiring fileutils in test_helper

History

#1 Updated by Dominic Cleal over 3 years ago

  • Related to Bug #14097: Only run DatabaseCleaner as 'truncation' on JS tests added

#2 Updated by Dominic Cleal over 3 years ago

  • Category set to Tests

What's the stack trace, command/output?

#3 Updated by Ori Rabin over 3 years ago

when running ruby -Itest test/unit/lookup_key_test.rb:

/home/orabin/foreman/test/test_helper.rb:12:in `block in <top (required)>': uninitialized constant FileUtils (NameError)
from /home/orabin/.rvm/gems/ruby-2.2.3@foreman/gems/spork-1.0.0rc4/lib/spork.rb:24:in `prefork'
from /home/orabin/foreman/test/test_helper.rb:4:in `<top (required)>'
from /home/orabin/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from /home/orabin/.rvm/rubies/ruby-2.2.3/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require'
from test/unit/lookup_key_test.rb:1:in `<main>'

#4 Updated by The Foreman Bot over 3 years ago

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

#5 Updated by Dominic Cleal over 3 years ago

Thanks, I see it now. I usually use "bundle exec" and Bundler loads FileUtils, so don't see this error (probably the same for rake too).

It happens any time log/test.log exists after a test run - may not be related to #14097. Deleting the file first works around it too.

#6 Updated by Ori Rabin over 3 years ago

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

#7 Updated by Dominic Cleal over 3 years ago

  • Legacy Backlogs Release (now unused) set to 136

Also available in: Atom PDF