summaryrefslogtreecommitdiff
path: root/spec/unit/provider/cron/unix_spec.rb
Commit message (Collapse)AuthorAgeFilesLines
* fix Style/BlockDelimiters, Style/MultilineBlockLayout and 0.42.0 engine upgradeLamont Granquist2016-08-171-4/+4
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Copyright year update for 2016 and massive cleanup.Noah Kantrowitz2016-02-021-2/+2
| | | Generated via git ls-files | xargs perl -pi -e "s/[Cc]opyright (?:\([Cc]\) )?((?\!$(date +%Y))\\d{4})(-\\d{4})?([, ][ \d]+)*(,|(?= ))/Copyright \\1-$(date +%Y),/g"
* Use double quotes by defaultThom May2016-01-141-5/+5
| | | | | | | This is an entirely mechanically generated (chefstyle -a) change, to go along with chef/chefstyle#5 . We should pick something and use it consistently, and my opinion is that double quotes are the appropriate thing.
* Log output of crontab -l when non-zero exit statusEric Saxby2014-10-011-0/+12
| | | | | | | | | When reading a unix crontab and we receive a non-zero exit status, log the stdout and stderr to debug. We expect exit status 1 to happen when the user does not have a crontab, but let's log anyways for help in troubleshooting unexpected situations.
* Unix cron provider uses shell_outEric Saxby & Greg Poirier2014-09-261-60/+66
| | | | - update unix_spec to more modern RSpec syntax - both #read_crontab and #write_crontab use shell_out
* Reading user crontab on unix as that userEric Saxby2014-09-231-6/+6
| | | | | | | | | | | Crontab on Solaris and Illumos systems with auditing enabled audits root attempts to read non-root user crontabs. If chef-client runs without an auditing context (as happens by default when running in SMF), these crontab calls will fails with exit status 1. By switching to the non-root user first (which somehow does not require auditing), we should be able to read user crontabs without an auditing context.
* s/mock\(/double(/gLamont Granquist2014-01-291-5/+5
|
* s/stub!/stub/gLamont Granquist2014-01-291-6/+6
| | | | fix deprecation warnings
* fix unit test for cron and stderrs check nil.kaustubh-d2013-08-041-3/+3
|
* move tests to abstracted unix cron.kaustubh-d2013-08-041-0/+121