HomePhorge

Fix tests with "relative" paths on Windows
c26f3e5f79faUnpublished

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>
(cherry picked from commit 462a95e3d077b1915a919399b846068816c84583)

Conflicts:

spec/unit/parser/functions/extlookup_spec.rb

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
Jacob Helwig <jacob@puppetlabs.com>Committed on Aug 19 2011, 10:48 PM
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUbfeb33734358: (#8268) Require windows drive letters in absolute file paths
Branches
Unknown
Tags
Unknown

Event Timeline

Jacob Helwig <jacob@puppetlabs.com> committed rPUc26f3e5f79fa: Fix tests with "relative" paths on Windows (authored by Josh Cooper <josh@puppetlabs.com>).Aug 19 2011, 10:48 PM