summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2020-04-15 18:39:38 -0700
committerGitHub <noreply@github.com>2020-04-15 18:39:38 -0700
commit9d06f6748c5794dec83a4befbcbf887eb41ff6b5 (patch)
treeae5b69bc3e22176702e2c074414a88d4c03b81b0 /spec
parent00401f60e859ac2e06c13108a3e99035afcf4e3d (diff)
parent1055333ac4d4912ac671bca07bc3cd430cd2ef64 (diff)
downloadchef-9d06f6748c5794dec83a4befbcbf887eb41ff6b5.tar.gz
Merge pull request #9666 from chef/eol_release_warning
Add a warning to the end of the chef run for EOL releses
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/client_spec.rb16
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/unit/client_spec.rb b/spec/unit/client_spec.rb
index 37b7f30ad2..8553c52b79 100644
--- a/spec/unit/client_spec.rb
+++ b/spec/unit/client_spec.rb
@@ -307,6 +307,22 @@ describe Chef::Client do
end
end
+ describe "eol release warning" do
+ it "warns when running an EOL release" do
+ stub_const("Chef::VERSION", 15)
+ allow(Time).to receive(:now).and_return(Time.new(2021, 5, 1, 5))
+ expect(logger).to receive(:warn).with(/This release of.*became end of life \(EOL\) on May 1st 2021/)
+ client.warn_if_eol
+ end
+
+ it "does not warn when running an non-EOL release" do
+ stub_const("Chef::VERSION", 15)
+ allow(Time).to receive(:now).and_return(Time.new(2021, 4, 31))
+ expect(logger).to_not receive(:warn).with(/became end of life/)
+ client.warn_if_eol
+ end
+ end
+
describe "authentication protocol selection" do
context "when FIPS is disabled" do
before do