diff options
| author | Luke Kanies <luke@madstop.com> | 2007-09-06 20:12:30 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-09-06 20:12:30 -0500 |
| commit | 7abc78ad25979c62b585127a8f2a32c55e96819f (patch) | |
| tree | 51cc4c7be632b09025b91100441672d5918bed81 /test | |
| parent | 4212f9c2250377793d6ed636c18c7a8538160366 (diff) | |
| download | puppet-7abc78ad25979c62b585127a8f2a32c55e96819f.tar.gz puppet-7abc78ad25979c62b585127a8f2a32c55e96819f.tar.xz puppet-7abc78ad25979c62b585127a8f2a32c55e96819f.zip | |
Fixing #795 -- configuration elements now make sure all file paths are fully qualified by prepending the wd to unqualified path names.
Diffstat (limited to 'test')
| -rwxr-xr-x | test/util/config.rb | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/test/util/config.rb b/test/util/config.rb index 137c55d10..f99ad54b4 100755 --- a/test/util/config.rb +++ b/test/util/config.rb @@ -59,6 +59,21 @@ class TestConfig < Test::Unit::TestCase } end + # #795 - when --config=relative, we want to fully expand file paths. + def test_relative_paths_when_to_transportable + config = mkconfig + config.setdefaults :yay, :transtest => ["/what/ever", "yo"] + file = config.element(:transtest) + + # Now override it with a relative path name + config[:transtest] = "here" + + should = File.join(Dir.getwd, "here") + + object = file.to_transportable[0] + assert_equal(should, object.name, "Did not translate relative pathnames to full path names") + end + def test_to_manifest set_configs manifest = nil @@ -79,7 +94,7 @@ class TestConfig < Test::Unit::TestCase trans = interp.compile(node) end assert_nothing_raised("Could not instantiate objects") { - trans.to_type + trans.extract.to_type } end |
