Bug #3308
Unit tests failing: NoMethodError: undefined method `fakedata' for
| Status: | Accepted | Start date: | 02/27/2010 | |
|---|---|---|---|---|
| Priority: | Low | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | testing | |||
| Target version: | - | |||
| Affected Puppet version: | 0.25.4 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
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:
- Install the puppet-testsuite package on Ubuntu Lucid
- cd /usr/share/puppet-testsuite/
- sudo rake
Related issues
History
Updated by Markus Roberts almost 2 years ago
- Category set to testing
- Status changed from Unreviewed to Accepted
- Priority changed from Normal to Low
Note that these are errors in the older unit tests not the current spec/unit tests. The correct resolution is to bring the tests up to date (#2969).
Updated by Mathias Gug almost 2 years ago
Now that the test is supposed to be converted to spec/ unit tests, it fails with the following error:
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'
Updated by Mathias Gug almost 2 years ago
Upon more investigation this is due to the location of the test suite under lucid. The puppet-testsuite package installs the suite user /usr/share/puppet-testsuite instead of /usr/share/test as expected by the upstream code.