Commit Graph

22 Commits

Author SHA1 Message Date
Benjamin J Cane
61afd6e69f Revising for PEP8 checks 2016-11-11 14:11:16 -07:00
Benjamin J Cane
cf7585c9ab Removing blank line for PEP compliance 2016-11-11 13:08:10 -07:00
Benjamin J Cane
405c3336aa Revising cron state & module for OS agnostic support of cron when running as non-rootSquashed commit of the following:
commit d5003a44230f7bb6878057023726ba7135c9909c
Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
Date:   Fri Nov 11 10:22:21 2016 -0700

    Revising cron state & module for OS agnostic support of cron when running as non-root

    commit c9c20fc34670e1b371c505d8b7959ea00ae0a36e
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Thu Nov 10 15:47:04 2016 -0700

        Re-adding removed comment

    commit 4058bf3f609aeec11e0ff2a91191eba16556abf0
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Mon Nov 7 11:08:20 2016 -0700

        Adding user to error message and fixing key error if there is no updates

    commit 768e28e43585451a241979d048d5ac704f4f8f60
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 23:24:13 2016 -0700

        Added try/except on group identification and refactored success messaging

    commit d575189b17c1b75ef6d43b9ca821fb66aa142531
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 23:23:38 2016 -0700

        Added try/except on group identification and refactored success messaging

    commit 13a8207e5bc99044a3dfca4412e34ba9884d44a8
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 17:21:18 2016 -0700

        Resolving group permissions issues when managing non-root crontabs

    commit 89a7d1e04f21f1cbd93b83052cf47ba7a7225d72
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Nov 4 12:32:55 2016 -0700

        Adding unit tests for OS specific cron command string rules

    commit b2a00009fda987474c40cee3f2ed8affe5f07f5b
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Wed Nov 2 09:10:06 2016 -0700

        Fixing cron.file when running as non-root

    commit ba27b18b01f304e541af8b6c7107596f34651123
    Author: Benjamin J Cane <Benjamin.J.Cane@aexp.com>
    Date:   Fri Oct 28 10:58:03 2016 -0700

        Removed OS specific logic to always run crontab commands as owner of cron
2016-11-11 10:36:48 -07:00
Eric Radman
b9be6521db Preserve trailing lines in crontab
This allows cron.file to install a crontab file that contains trailing
newlines. Previously a change may have been detected on every run.
2016-07-22 12:18:08 -04:00
Christophe Drevet-Droguet
4a00cc5b70 cron: support for commented cron jobs
This change is an implementation for managing commented cron jobs.

Before that, commented cron jobs were not manageable by salt. They were ignored
at reading, and thus lost while writing the new crontab.
This is described in issue #29082, which should be fixed now.

There is a new `commented` parameter, defaulting to False. The cron job is
set like any other, but is prefixed by `#DISABLED#`.
2015-12-07 15:40:36 +01:00
Dmitry Kuzmenko
002b1ef9bd Fixed use of assert_has_calls in tests.
The method logic was changed in mock-1.1.0.
This mades the use of the method compatible with both <1.1.0 and >=1.1.0
2015-11-25 15:31:20 +03:00
Erik Johnson
106f386df3 tests/unit/modules/cron_test.py: remove raw string formatting 2015-08-26 23:26:08 -05:00
Michael Steed
f9cf15ad46 fix new failures on ubuntu 14.04 2015-06-09 14:18:04 -06:00
Michael Steed
f725b8e4fe lint 2015-06-09 13:14:54 -06:00
Michael Steed
ce5f14bb0e set encoding in test__unicode_match() 2015-06-09 11:19:51 -06:00
Michael Steed
83a96367a4 Manual merge of #24414 per thatch45 2015-06-06 07:47:52 -06:00
Justin Findlay
5dc09e7da1 update cron and cmd tests for cron runas changes 2015-03-10 15:57:24 -06:00
Pedro Algarvio
60f215f191 Add from __future__ import absolute_import 2015-01-30 22:25:04 +00:00
David Boucha
9dc182a2f4 fix codeauthor misspellings 2014-05-21 18:59:02 -06:00
Mathieu Le Marec - Pasquet
de66244e65 cron: fix test 2014-04-18 14:50:50 +02:00
Mathieu Le Marec - Pasquet
cfa93f9f92 cron: Fix for #10959 2014-03-11 09:18:11 +00:00
Mathieu Le Marec - Pasquet
bfa176f110 cron: complete matching rework 2014-02-19 22:44:34 +01:00
Mathieu Le Marec - Pasquet
90dc963c1c cron: better behavior of crontabs tracking 2014-02-19 20:39:44 +01:00
Thayne Harbaugh
446599adc5 Correctly grain for test "os" => "os_family": issue-10215 2014-02-05 14:38:45 -07:00
Nahum Shalman
b1e81a5ebb Fix cron state to work on SmartOS
SmartOS and Solaris are both in the Solaris os_family
If we use that grain, the module should work on SmartOS
2014-02-04 17:00:18 -05:00
Pedro Algarvio
b03c779718 Don't assume mock and timelib are instaled. 2013-12-31 13:53:37 +00:00
Mike Place
d8facc96a4 Unit testing cron exec module. 2013-12-17 15:59:57 -07:00