summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorDaniel Pittman <daniel@rimspace.net>2011-03-08 17:05:01 -0800
committerDaniel Pittman <daniel@rimspace.net>2011-03-08 17:15:20 -0800
commit349f6f2f25f4e13c2bf7c16a54f2d1c3ae85ac5f (patch)
treed9b9411339da5cd2053d1893a0839c58241a28cf /spec
parent6a96584ea92afc83383dad85d1a2db956a58c323 (diff)
downloadpuppet-349f6f2f25f4e13c2bf7c16a54f2d1c3ae85ac5f.tar.gz
puppet-349f6f2f25f4e13c2bf7c16a54f2d1c3ae85ac5f.tar.xz
puppet-349f6f2f25f4e13c2bf7c16a54f2d1c3ae85ac5f.zip
(#6641) Make it easier to add future platforms to the suite.
When a new fstab fixture is added, we also want to try to test mount output. If that fixture is missing, we would have failed a test, but now mark it pending. This is more correct when, for example, we don't yet have that fixture: it isn't technically a failure, just an incomplete set of test data.
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/provider/mount/parsed_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/unit/provider/mount/parsed_spec.rb b/spec/unit/provider/mount/parsed_spec.rb
index e8a862fdb..43defbe87 100755
--- a/spec/unit/provider/mount/parsed_spec.rb
+++ b/spec/unit/provider/mount/parsed_spec.rb
@@ -201,6 +201,14 @@ FSTAB
pending "We need to stub the operatingsystem fact at load time, but can't"
end
+ # Stub the mount output to our fixture.
+ begin
+ mount = my_fixture(platform + '.mount')
+ @provider.stubs(:mountcmd).returns File.read(mount)
+ rescue
+ pending "is #{platform}.mount missing at this point?"
+ end
+
# Note: we have to stub default_target before creating resources
# because it is used by Puppet::Type::Mount.new to populate the
# :target property.
@@ -216,8 +224,6 @@ FSTAB
[@res_ghost, @res_mounted, @res_unmounted, @res_absent].each do |resource|
@resource_hash[resource.name] = resource
end
-
- @provider.stubs(:mountcmd).returns File.read(my_fixture(platform + '.mount'))
end
it "should set :ensure to :unmounted if found in fstab but not mounted" do