diff options
author | Thom May <thom@chef.io> | 2018-03-13 14:16:03 +0000 |
---|---|---|
committer | Thom May <thom@chef.io> | 2018-03-19 14:00:31 +0000 |
commit | 3402b95505b6c7424d144185be9c281b60e0360b (patch) | |
tree | bac9208c3f8f77f1fa1f6ceae159f9fa117b4f1d /spec/unit | |
parent | 7bb7391688c973388db85efb1156e995d654cfb2 (diff) | |
download | chef-3402b95505b6c7424d144185be9c281b60e0360b.tar.gz |
Clean up mount provider teststm/backport_6851
Signed-off-by: Thom May <thom@chef.io>
Diffstat (limited to 'spec/unit')
-rw-r--r-- | spec/unit/provider/mount/solaris_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/resource/mount_spec.rb | 41 |
2 files changed, 2 insertions, 43 deletions
diff --git a/spec/unit/provider/mount/solaris_spec.rb b/spec/unit/provider/mount/solaris_spec.rb index 264c8b9b36..2ec9feaf3b 100644 --- a/spec/unit/provider/mount/solaris_spec.rb +++ b/spec/unit/provider/mount/solaris_spec.rb @@ -538,7 +538,7 @@ describe Chef::Provider::Mount::Solaris, :unix_only do context "after the mount's state has been discovered" do describe "mount_fs" do it "should mount the filesystem" do - expect(provider).to receive(:shell_out!).with("mount -F #{fstype} -o defaults #{device} #{mountpoint}") + expect(provider).to receive(:shell_out!).with("mount -F #{fstype} #{device} #{mountpoint}") provider.mount_fs() end @@ -600,7 +600,7 @@ describe Chef::Provider::Mount::Solaris, :unix_only do context "in the typical case" do let(:other_mount) { "/dev/dsk/c0t2d0s0 /dev/rdsk/c0t2d0s0 / ufs 2 yes -" } - let(:this_mount) { "/dev/dsk/c0t2d0s7\t/dev/rdsk/c0t2d0s7\t/mnt/foo\tufs\t2\tyes\tdefaults\n" } + let(:this_mount) { "/dev/dsk/c0t2d0s7\t/dev/rdsk/c0t2d0s7\t/mnt/foo\tufs\t2\tyes\t-\n" } let(:vfstab_file_contents) { [other_mount].join("\n") } diff --git a/spec/unit/resource/mount_spec.rb b/spec/unit/resource/mount_spec.rb index 1d4cc880d9..29a6bdf1f3 100644 --- a/spec/unit/resource/mount_spec.rb +++ b/spec/unit/resource/mount_spec.rb @@ -173,45 +173,4 @@ describe Chef::Resource::Mount do resource.domain("TEST_DOMAIN") expect(resource.domain).to eq("TEST_DOMAIN") end - - describe "when it has mount point, device type, and fstype" do - before do - resource.device("charmander") - resource.mount_point("123.456") - resource.device_type(:device) - resource.fstype("ranked") - end - - it "describes its state" do - state = resource.state_for_resource_reporter - expect(state[:mount_point]).to eq("123.456") - expect(state[:device_type]).to eql(:device) - expect(state[:fstype]).to eq("ranked") - end - - it "returns the device as its identity" do - expect(resource.identity).to eq("charmander") - end - end - - describe "when it has username, password and domain" do - before do - resource.mount_point("T:") - resource.device("charmander") - resource.username("Administrator") - resource.password("Jetstream123!") - resource.domain("TEST_DOMAIN") - end - - it "describes its state" do - state = resource.state_for_resource_reporter - expect(state[:mount_point]).to eq("T:") - expect(state[:username]).to eq("Administrator") - expect(state[:password]).to eq("*sensitive value suppressed*") - expect(state[:domain]).to eq("TEST_DOMAIN") - expect(state[:device_type]).to eql(:device) - expect(state[:fstype]).to eq("auto") - end - - end end |