summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2017-12-06 13:25:48 -0800
committerTim Smith <tsmith@chef.io>2017-12-06 20:00:00 -0800
commit988263fddb8e077fc6acc21a9a45fd47b0f5fb60 (patch)
tree641b647098fa2e14a2e197a03ac86fcafa69118c
parent804d61eecefd9b9d87e42f5cde5386be511a044b (diff)
downloadchef-988263fddb8e077fc6acc21a9a45fd47b0f5fb60.tar.gz
Clarify that we're talking about the 1 and only SYSTEM user here
Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--lib/chef/resource/windows_task.rb2
-rw-r--r--spec/functional/resource/windows_task_spec.rb2
-rw-r--r--spec/unit/resource/windows_task_spec.rb2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb
index 235bbdfd67..98e002dc54 100644
--- a/lib/chef/resource/windows_task.rb
+++ b/lib/chef/resource/windows_task.rb
@@ -121,7 +121,7 @@ class Chef
def validate_user_and_password(user, password)
if user && use_password?(user)
if password.nil?
- raise ArgumentError, "Can't specify a non-system user without a password!"
+ raise ArgumentError, "Cannot specify a user other than the 'SYSTEM' user without specifying a password!"
end
end
end
diff --git a/spec/functional/resource/windows_task_spec.rb b/spec/functional/resource/windows_task_spec.rb
index aeefd63bc5..b59f0670b6 100644
--- a/spec/functional/resource/windows_task_spec.rb
+++ b/spec/functional/resource/windows_task_spec.rb
@@ -339,7 +339,7 @@ describe Chef::Resource::WindowsTask, :windows_only do
it "raises error" do
subject.user "Administrator"
subject.frequency :onstart
- expect { subject.after_created }.to raise_error("Can't specify a non-system user without a password!")
+ expect { subject.after_created }.to raise_error("Cannot specify a user other than the 'SYSTEM' user without specifying a password!")
end
end
diff --git a/spec/unit/resource/windows_task_spec.rb b/spec/unit/resource/windows_task_spec.rb
index cf4651cf52..f6489cace7 100644
--- a/spec/unit/resource/windows_task_spec.rb
+++ b/spec/unit/resource/windows_task_spec.rb
@@ -124,7 +124,7 @@ describe Chef::Resource::WindowsTask do
context "when password is not passed" do
it "raises error with non-system users" do
allow(resource).to receive(:use_password?).and_return(true)
- expect { resource.send(:validate_user_and_password, "Testuser", nil) }.to raise_error("Can't specify a non-system user without a password!")
+ expect { resource.send(:validate_user_and_password, "Testuser", nil) }.to raise_error("Cannot specify a user other than the 'SYSTEM' user without specifying a password!")
end
end
end