summaryrefslogtreecommitdiff
path: root/kitchen-tests
diff options
context:
space:
mode:
authorMatthew Newell <18470637+wheatevo@users.noreply.github.com>2021-10-14 16:12:43 -0500
committerTim Smith <tsmith84@gmail.com>2021-11-09 16:46:25 -0800
commit5c7a67ac2edbb11976ff972e15b2e551ad98d51c (patch)
tree52b6eb14251d0fa7c21398c8a7162e3aba493aac /kitchen-tests
parent4bf644037f2409b5fcf4e1aedb1736a2b26b1b57 (diff)
downloadchef-cron_16.tar.gz
Fix cron resource commented job handlingcron_16
This change fixes an edge case failure that may occur when processing a cron resource where the following conditions are true: * A `# Chef Name` comment exists for the job * The following line is commented out * The new cron resource uses default values for the minute, hour, day, month, weekday, and time properties This causes the following error to be raised within the `Chef::Provider::Cron#cron_different?` method: ``` Chef::Exceptions::ValidationFailed ---------------------------------- command is a required property ``` The new guard prevents `cron_different?` from being called when the current resource does not have a set command property. Since the new resource requires the command property to be set to be valid, we can assume it is different from the current cron resource if the command is unset. Signed-off-by: Matthew Newell <18470637+wheatevo@users.noreply.github.com>
Diffstat (limited to 'kitchen-tests')
0 files changed, 0 insertions, 0 deletions