From a2af7dd0b9713f279724d2c7e6f17bfd8ce2d95b Mon Sep 17 00:00:00 2001 From: Jorie Tappa Date: Tue, 31 Jul 2018 14:56:46 -0500 Subject: Initial cron import from puppet 7a4c5f07bdf61a7bc7aa32a50e99489a604eac52 --- .../provider/cron/crontab/create_normal_entry | 19 +++++++++++++++++++ .../provider/cron/crontab/create_special_entry | 18 ++++++++++++++++++ .../integration/provider/cron/crontab/crontab_user1 | 15 +++++++++++++++ .../integration/provider/cron/crontab/crontab_user2 | 4 ++++ .../integration/provider/cron/crontab/modify_entry | 13 +++++++++++++ .../provider/cron/crontab/moved_cronjob_input1 | 15 +++++++++++++++ .../provider/cron/crontab/moved_cronjob_input2 | 6 ++++++ .../fixtures/integration/provider/cron/crontab/purged | 8 ++++++++ .../provider/cron/crontab/remove_named_resource | 12 ++++++++++++ .../provider/cron/crontab/remove_unnamed_resource | 14 ++++++++++++++ .../integration/provider/cron/crontab/unspecialized | 15 +++++++++++++++ 11 files changed, 139 insertions(+) create mode 100644 spec/fixtures/integration/provider/cron/crontab/create_normal_entry create mode 100644 spec/fixtures/integration/provider/cron/crontab/create_special_entry create mode 100644 spec/fixtures/integration/provider/cron/crontab/crontab_user1 create mode 100644 spec/fixtures/integration/provider/cron/crontab/crontab_user2 create mode 100644 spec/fixtures/integration/provider/cron/crontab/modify_entry create mode 100644 spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input1 create mode 100644 spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input2 create mode 100644 spec/fixtures/integration/provider/cron/crontab/purged create mode 100644 spec/fixtures/integration/provider/cron/crontab/remove_named_resource create mode 100644 spec/fixtures/integration/provider/cron/crontab/remove_unnamed_resource create mode 100644 spec/fixtures/integration/provider/cron/crontab/unspecialized (limited to 'spec/fixtures/integration') diff --git a/spec/fixtures/integration/provider/cron/crontab/create_normal_entry b/spec/fixtures/integration/provider/cron/crontab/create_normal_entry new file mode 100644 index 0000000..e3e2c04 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/create_normal_entry @@ -0,0 +1,19 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly +# Puppet Name: new entry +MAILTO="" +SHELL=/bin/bash +12 * * * 2 /bin/new diff --git a/spec/fixtures/integration/provider/cron/crontab/create_special_entry b/spec/fixtures/integration/provider/cron/crontab/create_special_entry new file mode 100644 index 0000000..ee25954 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/create_special_entry @@ -0,0 +1,18 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly +# Puppet Name: new special entry +MAILTO=bob@company.com +@reboot echo "Booted" 1>&2 diff --git a/spec/fixtures/integration/provider/cron/crontab/crontab_user1 b/spec/fixtures/integration/provider/cron/crontab/crontab_user1 new file mode 100644 index 0000000..2c7d542 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/crontab_user1 @@ -0,0 +1,15 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly diff --git a/spec/fixtures/integration/provider/cron/crontab/crontab_user2 b/spec/fixtures/integration/provider/cron/crontab/crontab_user2 new file mode 100644 index 0000000..267e643 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/crontab_user2 @@ -0,0 +1,4 @@ +# HEADER: some simple +# HEADER: header +# Puppet Name: some_unrelevant job +* * * * * /bin/true diff --git a/spec/fixtures/integration/provider/cron/crontab/modify_entry b/spec/fixtures/integration/provider/cron/crontab/modify_entry new file mode 100644 index 0000000..ed06fd4 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/modify_entry @@ -0,0 +1,13 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +@monthly /usr/bin/monthly diff --git a/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input1 b/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input1 new file mode 100644 index 0000000..2c7d542 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input1 @@ -0,0 +1,15 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly diff --git a/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input2 b/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input2 new file mode 100644 index 0000000..0b68287 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/moved_cronjob_input2 @@ -0,0 +1,6 @@ +# HEADER: some simple +# HEADER: header +# Puppet Name: some_unrelevant job +* * * * * /bin/true +# Puppet Name: My daily failure +@daily /bin/false diff --git a/spec/fixtures/integration/provider/cron/crontab/purged b/spec/fixtures/integration/provider/cron/crontab/purged new file mode 100644 index 0000000..b302836 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/purged @@ -0,0 +1,8 @@ +# HEADER: some simple +# HEADER: header + +# commend with blankline above and below + + +# Puppet Name: only managed entry +* * * * * /bin/true diff --git a/spec/fixtures/integration/provider/cron/crontab/remove_named_resource b/spec/fixtures/integration/provider/cron/crontab/remove_named_resource new file mode 100644 index 0000000..e1c1716 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/remove_named_resource @@ -0,0 +1,12 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly diff --git a/spec/fixtures/integration/provider/cron/crontab/remove_unnamed_resource b/spec/fixtures/integration/provider/cron/crontab/remove_unnamed_resource new file mode 100644 index 0000000..2dcbfe2 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/remove_unnamed_resource @@ -0,0 +1,14 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + + +# Puppet Name: My daily failure +MAILTO="" +@daily /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly diff --git a/spec/fixtures/integration/provider/cron/crontab/unspecialized b/spec/fixtures/integration/provider/cron/crontab/unspecialized new file mode 100644 index 0000000..e6a4082 --- /dev/null +++ b/spec/fixtures/integration/provider/cron/crontab/unspecialized @@ -0,0 +1,15 @@ +# HEADER: some simple +# HEADER: header +@daily /bin/unnamed_special_command >> /dev/null 2>&1 + +# commend with blankline above and below + +17-19,22 0-23/2 * * 2 /bin/unnamed_regular_command + +# Puppet Name: My daily failure +MAILTO="" +* * * * * /bin/false +# Puppet Name: Monthly job +SHELL=/bin/sh +MAILTO=mail@company.com +15 14 1 * * $HOME/bin/monthly -- cgit v1.2.3