summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
committerNick Lewis <nick@puppetlabs.com>2011-01-05 15:54:00 -0800
commit19eb1e78e115d10bfb822e510213e4fab9cd2599 (patch)
treed5068dfd7a3890c7b5961779c87681b930cf3144 /test
parentcc1f2b39a65e8b74c8e59a2bf7d8f47a35985ee4 (diff)
parent83ac3e789ddc8dbf40c93460032474870fb16c54 (diff)
downloadpuppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.tar.gz
puppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.tar.xz
puppet-19eb1e78e115d10bfb822e510213e4fab9cd2599.zip
Merge branch '2.6.next' into 2.6.x
Diffstat (limited to 'test')
-rw-r--r--test/lib/puppettest/fileparsing.rb2
-rw-r--r--test/lib/puppettest/reporttesting.rb2
-rwxr-xr-xtest/other/report.rb2
-rwxr-xr-xtest/ral/providers/cron/crontab.rb5
4 files changed, 8 insertions, 3 deletions
diff --git a/test/lib/puppettest/fileparsing.rb b/test/lib/puppettest/fileparsing.rb
index 914c4bcb3..bd4f9e152 100644
--- a/test/lib/puppettest/fileparsing.rb
+++ b/test/lib/puppettest/fileparsing.rb
@@ -1,3 +1,5 @@
+require 'test/unit'
+
module PuppetTest::FileParsing
# Run an isomorphism test on our parsing process.
def fakedataparse(*files)
diff --git a/test/lib/puppettest/reporttesting.rb b/test/lib/puppettest/reporttesting.rb
index 448a6a9d8..54a2f6799 100644
--- a/test/lib/puppettest/reporttesting.rb
+++ b/test/lib/puppettest/reporttesting.rb
@@ -1,7 +1,7 @@
module PuppetTest::Reporttesting
def fakereport
# Create a bunch of log messages in an array.
- report = Puppet::Transaction::Report.new
+ report = Puppet::Transaction::Report.new("apply")
3.times { |i|
# We have to use warning so that the logs always happen
diff --git a/test/other/report.rb b/test/other/report.rb
index 8a909b41c..eacf1632b 100755
--- a/test/other/report.rb
+++ b/test/other/report.rb
@@ -68,7 +68,7 @@ class TestReports < Test::Unit::TestCase
def test_store_report
# Create a bunch of log messages in an array.
- report = Puppet::Transaction::Report.new
+ report = Puppet::Transaction::Report.new("apply")
# We have to reuse reporting here because of something going on in the
# server/report.rb file
diff --git a/test/ral/providers/cron/crontab.rb b/test/ral/providers/cron/crontab.rb
index 0c87a5bba..be2af1e16 100755
--- a/test/ral/providers/cron/crontab.rb
+++ b/test/ral/providers/cron/crontab.rb
@@ -97,7 +97,10 @@ class TestCronParsedProvider < Test::Unit::TestCase
# Then do them all at once.
records = []
text = ""
- sample_records.each do |name, options|
+ # Sort sample_records so that the :empty entry does not come last
+ # (if it does, the test will fail because the empty last line will
+ # be ignored)
+ sample_records.sort { |a, b| a.first.to_s <=> b.first.to_s }.each do |name, options|
records << options[:record]
text += options[:text] + "\n"
end