diff options
author | Andrew Shadura <andrew@shadura.me> | 2015-08-20 15:58:26 +0200 |
---|---|---|
committer | Andrew Shadura <andrew@shadura.me> | 2015-08-20 15:58:26 +0200 |
commit | ff1408420159488a106492ccd11dd234967029b6 (patch) | |
tree | 473420cee1c5229a427ec4cafead1aa6c0a26800 /reconfigure/tests/configs/crontab_tests.py |
Imported Upstream version 0.1.29
Diffstat (limited to 'reconfigure/tests/configs/crontab_tests.py')
-rw-r--r-- | reconfigure/tests/configs/crontab_tests.py | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/reconfigure/tests/configs/crontab_tests.py b/reconfigure/tests/configs/crontab_tests.py new file mode 100644 index 0000000..f1b28fe --- /dev/null +++ b/reconfigure/tests/configs/crontab_tests.py @@ -0,0 +1,53 @@ +from reconfigure.configs import CrontabConfig +from base_test import BaseConfigTest + + +class CrontabConfigTest (BaseConfigTest): + sources = { + None: """#comment line +* * * * * date +@reboot ls -al +1 * 0 1 2 date -s +NAME = TEST""" + } + result = { + 'normal_tasks': [ + { + 'minute': '*', + 'hour': '*', + 'day_of_month': '*', + 'month': '*', + 'day_of_week': '*', + 'command': 'date', + 'comment': 'comment line' + }, + { + 'minute': '1', + 'hour': '*', + 'day_of_month': '0', + 'month': '1', + 'day_of_week': '2', + 'command': 'date -s', + 'comment': None, + }, + + ], + 'special_tasks': [ + { + 'special': '@reboot', + 'command': 'ls -al', + 'comment': None, + } + ], + 'env_settings': [ + { + 'name': 'NAME', + 'value': 'TEST', + 'comment': None + } + ] + } + config = CrontabConfig + + +del BaseConfigTest |