Skip to content

#12070 Fix crontab value munging#361

Merged
slippycheeze merged 5 commits intopuppetlabs:2.7.xfrom
stschulte:ticket/2.7.x/12070
Jan 21, 2012
Merged

#12070 Fix crontab value munging#361
slippycheeze merged 5 commits intopuppetlabs:2.7.xfrom
stschulte:ticket/2.7.x/12070

Conversation

@stschulte
Copy link
Contributor

The commit series starts as a few refactoring steps for the cron type spec where I discovered the error. The last commit finally fixes #12070

rspec already gives us a described_class method so why not using
it.
Instead of using a mock object it is simpler to just create a real
provider class.  We now also have a @provider_class.new method and
there is no need for a fake provider instance.
Two tests will now fail because the error message does not match the
expected behaviour.

  1) Puppet::Type::Cron when validating attribute weekday should not
  support invalid steps

  2) Puppet::Type::Cron when validating attribute month should not
  support invalid steps
If the specified value does include characters that have a special
meaning inside a regex puppet raised errors like

    target of repeat operator is not specified: /*\/a/i

Change if clause to do a real substring tests instead of using a regex.

All spec tests do now pass
@domcleal
Copy link
Contributor

Reviewed, +1.

slippycheeze added a commit that referenced this pull request Jan 21, 2012
@slippycheeze slippycheeze merged commit 8804e1d into puppetlabs:2.7.x Jan 21, 2012
hlindberg pushed a commit to hlindberg/puppet that referenced this pull request Oct 16, 2014
Remove two guides and change all relevant links
melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018
(maint) Update modules' interface doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants