diff options
author | Jeremy J. Miller <jm@chef.io> | 2016-10-06 17:46:26 -0400 |
---|---|---|
committer | Jeremy J. Miller <jm@chef.io> | 2016-10-06 18:05:05 -0400 |
commit | 1a2f0c6422adc4c304bdd36af9fcdbb43df54e3a (patch) | |
tree | 064f5b11070241aeec410bdd4f919bb6afa497cc /spec/unit/application | |
parent | 1a0c4c533be9e8a35a6fa8650e7a478f19d90ae6 (diff) | |
download | chef-1a2f0c6422adc4c304bdd36af9fcdbb43df54e3a.tar.gz |
Adding support for rfc 62 exit code 213
Signed-off-by: Jeremy J. Miller <jm@chef.io>
Diffstat (limited to 'spec/unit/application')
-rw-r--r-- | spec/unit/application/exit_code_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/application/exit_code_spec.rb b/spec/unit/application/exit_code_spec.rb index 73a113e554..59ee400c23 100644 --- a/spec/unit/application/exit_code_spec.rb +++ b/spec/unit/application/exit_code_spec.rb @@ -64,6 +64,10 @@ describe Chef::Application::ExitCode do it "validates a REBOOT_FAILED return code of 41" do expect(valid_rfc_exit_codes.include?(41)).to eq(true) end + + it "validates a CLIENT_UPGRADED return code of 213" do + expect(valid_rfc_exit_codes.include?(213)).to eq(true) + end end context "when Chef::Config :exit_status is not configured" do @@ -215,6 +219,12 @@ describe Chef::Application::ExitCode do expect(exit_codes.normalize_exit_code(runtime_error)).to eq(37) end + it "returns CLIENT_UPGRADED when the client was upgraded during converge" do + client_upgraded_error = Chef::Exceptions::ClientUpgraded.new("BOOM") + runtime_error = Chef::Exceptions::RunFailedWrappingError.new(client_upgraded_error) + expect(exit_codes.normalize_exit_code(runtime_error)).to eq(213) + end + it "returns SIGINT_RECEIVED when a SIGINT is received." do sigint_error = Chef::Exceptions::SigInt.new("BOOM") runtime_error = Chef::Exceptions::RunFailedWrappingError.new(sigint_error) |