HomePhorge

Fix tests with "relative" paths on Windows
462a95e3d077Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

Fix tests with "relative" paths on Windows

Absolute paths on Unix, e.g. /foo/bar, are not absolute on Windows,
which breaks many test cases. This commit adds a method to
PuppetSpec::Files.make_absolute that makes the path absolute in
test cases.

On Unix (Puppet.features.posix?) it is a no-op. On Windows,
(Puppet.features.microsoft_windows?) the drive from the current
working directory is prepended.

Reviewed-by: Jacob Helwig <jacob@puppetlabs.com>

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPU45ae5b4a9ced: (#8268) Require windows drive letters in absolute file paths
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPU462a95e3d077: Fix tests with "relative" paths on Windows (authored by Josh Cooper <josh@puppetlabs.com>).Jul 19 2011, 11:06 PM