HomePhorge

(PUP-1624) cron: fix a unit test regression
0187ee5f3776Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(PUP-1624) cron: fix a unit test regression

The cron unit tests make use of an artificial trivial provider.
Therefor the type code should not traverse code paths that apply only
when the crontab provider is used. For some reason, this didn't work
correctly when the provider was stubbed in place 'before :all' instead of
'before :each'.

As a result, this following test failed because of the change to the
behavior of the user property when using crontab:

Puppet::Type::Cron should default to user => root

if Etc.getpwuid(Process.uid) returns nil (#12357)

Restructure the hooks to make the behavioral check pass again.

Details

Provenance
Felix Frank <Felix.Frank@Alumni.TU-Berlin.de>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb0df220a8d9e: (PUP-1624) cron: move the default value logic from user to target
Branches
Unknown
Tags
Unknown

Event Timeline

Felix Frank <Felix.Frank@Alumni.TU-Berlin.de> committed rPU0187ee5f3776: (PUP-1624) cron: fix a unit test regression (authored by Felix Frank <Felix.Frank@Alumni.TU-Berlin.de>).Mar 3 2014, 11:18 PM