From 4cbe09bcc1b37d5b5b6112566e5bc6270d00530b Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Mon, 18 Nov 2019 11:17:53 -0800 Subject: Fix spec failures by moving default_action Signed-off-by: Tim Smith --- lib/chef/resource/reboot.rb | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/chef/resource/reboot.rb b/lib/chef/resource/reboot.rb index 8c83b1dec4..7af55dd242 100644 --- a/lib/chef/resource/reboot.rb +++ b/lib/chef/resource/reboot.rb @@ -1,6 +1,6 @@ # # Author:: Chris Doherty ) -# Copyright:: Copyright 2014-2018, Chef, Inc. +# Copyright:: Copyright 2014-2019, Chef, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,8 +35,6 @@ class Chef " probably undesired results." introduced "12.0" - default_action :nothing # make sure people are quite clear what they want - property :reason, String, description: "A string that describes the reboot action.", default: "Reboot by #{Chef::Dist::PRODUCT}" @@ -73,6 +71,11 @@ class Chef end end + # make sure people are quite clear what they want + # we have to define this below the actions since setting default_action to :nothing is a no-op + # and doesn't actually override the first action in the resource + default_action :nothing + action_class do # add a reboot to the node run_context # @return [void] -- cgit v1.2.1