diff options
-rw-r--r-- | lib/chef/property.rb | 6 | ||||
-rw-r--r-- | spec/unit/property_spec.rb | 14 | ||||
-rw-r--r-- | spec/unit/resource/mount_spec.rb | 2 |
3 files changed, 2 insertions, 20 deletions
diff --git a/lib/chef/property.rb b/lib/chef/property.rb index e258498189..a72e41a61e 100644 --- a/lib/chef/property.rb +++ b/lib/chef/property.rb @@ -242,11 +242,7 @@ class Chef # @return [Boolean] # def sensitive? - if name == :password - options.fetch(:sensitive, true) - else - options.fetch(:sensitive, false) - end + options.fetch(:sensitive, false) end # diff --git a/spec/unit/property_spec.rb b/spec/unit/property_spec.rb index 510b0f94d7..b8cf7f5d1b 100644 --- a/spec/unit/property_spec.rb +++ b/spec/unit/property_spec.rb @@ -118,20 +118,6 @@ describe "Chef::Resource.property" do end end - with_property ":password, String" do - it "password is sensitive by default" do - expect(resource.password "Jetstream123!").to eql("Jetstream123!") - expect(resource.state_for_resource_reporter[:password]).to eql("*sensitive value suppressed*") - end - end - - with_property ":password, String, sensitive: false" do - it "password is no longer sensitive" do - expect(resource.password "Jetstream123!").to eql("Jetstream123!") - expect(resource.state_for_resource_reporter[:password]).to eql("Jetstream123!") - end - end - with_property ":x, name_property: true" do context "and subclass" do let(:subresource_class) do diff --git a/spec/unit/resource/mount_spec.rb b/spec/unit/resource/mount_spec.rb index caa2e2f65a..466b6ac8c0 100644 --- a/spec/unit/resource/mount_spec.rb +++ b/spec/unit/resource/mount_spec.rb @@ -205,7 +205,7 @@ describe Chef::Resource::Mount 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[:password]).to eq("Jetstream123!") expect(state[:domain]).to eq("TEST_DOMAIN") expect(state[:device_type]).to eql(:device) expect(state[:fstype]).to eq("auto") |