Unit tests error: No fakedata matching ...

Bug #528812 reported by Mathias Gug
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppet
New
Undecided
Unassigned
puppet (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: puppet

While trying to run the puppet testsuite on Ubuntu Lucid the following error was thrown:

2) Error:

test_data(TestCronParsedProvider):
NoMethodError: undefined method `fakedata' for #<TestCronParsedProvider:0x7f8c7903a770>
./ral/providers/cron/crontab.rb:491:in `test_data'
/usr/lib/ruby/1.8/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
/usr/lib/ruby/1.8/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run'

There are other similar errors in the log. I’ve attached the complete log.

To reproduce:

   1. Install the puppet-testsuite package on Ubuntu Lucid
   2. cd /usr/share/puppet-testsuite/
   3. sudo rake

Revision history for this message
Mathias Gug (mathiaz) wrote :
Mathias Gug (mathiaz)
Changed in puppet (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Mathias Gug (mathiaz) wrote : Re: Unit tests error: test_data(TestCronParsedProvider): No fakedata matching /usr/share/test/data/providers/cron/examples/*

The test error is now:

 2) Error:
test_data(TestCronParsedProvider):
Puppet::DevError: No fakedata matching /usr/share/test/data/providers/cron/examples/*
    /usr/share/puppet-testsuite/lib/puppettest/support/utils.rb:160:in `fakedata'
    ./ral/providers/cron/crontab.rb:491:in `test_data'
    /usr/lib/ruby/1.8/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `__send__'
    /usr/lib/ruby/1.8/mocha/integration/test_unit/ruby_version_186_and_above.rb:19:in `run'

summary: - Unit tests error: NoMethodError: undefined method `fakedata' for
+ Unit tests error: test_data(TestCronParsedProvider): No fakedata
+ matching /usr/share/test/data/providers/cron/examples/*
Revision history for this message
Mathias Gug (mathiaz) wrote :

The error is due to the fact that the puppet test suite is installed in /usr/share/puppet-testsuite/ instead of /usr/share/test/. Fixing lib/puppettest/support/utils.rb to point to the correct path gets rid of the error.

summary: - Unit tests error: test_data(TestCronParsedProvider): No fakedata
- matching /usr/share/test/data/providers/cron/examples/*
+ Unit tests error: No fakedata matching ...
Revision history for this message
Dave Walker (davewalker) wrote :

I could not reproduce this on Natty, and therefore seems to have been fixed. I believe it may have been fixed in:

puppet (2.6.1~rc4-0ubuntu1) maverick; urgency=low

  [ Mathias Gug ]
  * New upstream version:
    - Fix "Puppet standalone broken" (Closes: #594575)
  * test/lib/puppettest/fakes.rb: Fix puppettest to use puppet system
    library.

  [ Stig Sandbeck Mathisen ]
  * Fix "require" path for puppet queue.
 -- Mathias Gug <email address hidden> Tue, 07 Sep 2010 10:44:22 -0400

Changed in puppet (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.