HomePhorge

Fix over-stubbing in tests revealed by agent changes.
afe4aa86d4e5Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix over-stubbing in tests revealed by agent changes.

Various tests of the agent stubbed File.read globally, which means that they
could pass if and only if there was only one read ever made by the agent in
the execution of "apply".

This was, in fact, true until recent changes to ensure the ENC could correctly
override the environment that the agent ran in - which, in turn, reveals the
coupling of these tests to the implementation.

This corrects those tests by using a real temporary file rather than stubbing
out all file reads in a shot.

Signed-off-by: Daniel Pittman <daniel@puppetlabs.com>

Details

Provenance
Daniel Pittman <daniel@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU006f9b17b1c7: Merge branch 'pcarlisle-ticket/master/3910-updates'
Branches
Unknown
Tags
Unknown

Event Timeline

Daniel Pittman <daniel@puppetlabs.com> committed rPUafe4aa86d4e5: Fix over-stubbing in tests revealed by agent changes. (authored by Daniel Pittman <daniel@puppetlabs.com>).Apr 25 2012, 2:29 AM