summaryrefslogtreecommitdiffstats
path: root/test/puppet
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 05:58:00 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-02-07 05:58:00 +0000
commit6affe220db1248cee8489347dc7d7ac071a534e4 (patch)
treee885f7ac374336c818374556065da70036b71211 /test/puppet
parent59c7b02f8fb0c5f2820577f11c9c34935ac16a0a (diff)
downloadpuppet-6affe220db1248cee8489347dc7d7ac071a534e4.tar.gz
puppet-6affe220db1248cee8489347dc7d7ac071a534e4.tar.xz
puppet-6affe220db1248cee8489347dc7d7ac071a534e4.zip
Committing both the finalization of the config code, plus all of the code necessary to get basic isomorphism from code to transportables and back. Mostly keyword and autoname stuff.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@871 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/puppet')
-rwxr-xr-xtest/puppet/conffiles.rb16
1 files changed, 6 insertions, 10 deletions
diff --git a/test/puppet/conffiles.rb b/test/puppet/conffiles.rb
index f966322f7..49da5fa46 100755
--- a/test/puppet/conffiles.rb
+++ b/test/puppet/conffiles.rb
@@ -27,11 +27,6 @@ class TestConfFiles < Test::Unit::TestCase
"boo" => {
"eb" => "fb"
},
- "rah" => {
- "aa" => "this is a sentence",
- "ca" => "dk",
- "ea" => "fk"
- },
},
{
"puppet" => {
@@ -41,7 +36,7 @@ class TestConfFiles < Test::Unit::TestCase
"okay" => "rah"
},
"back" => {
- "okay" => "rah"
+ "yayness" => "rah"
},
}
]
@@ -54,7 +49,7 @@ class TestConfFiles < Test::Unit::TestCase
data = data.dup
str += "[puppet]\n"
data["puppet"].each { |var, value|
- str += "%s %s\n" % [var, value]
+ str += "%s = %s\n" % [var, value]
}
data.delete("puppet")
end
@@ -62,7 +57,7 @@ class TestConfFiles < Test::Unit::TestCase
data.each { |type, settings|
str += "[%s]\n" % type
settings.each { |var, value|
- str += "%s %s\n" % [var, value]
+ str += "%s = %s\n" % [var, value]
}
}
@@ -85,14 +80,15 @@ class TestConfFiles < Test::Unit::TestCase
File.open(path, "w") { |f| f.print data2config(data) }
config = nil
assert_nothing_raised {
- config = Puppet::Config.new(path)
+ config = Puppet::Config.new
+ config.parse(path)
}
data.each { |section, hash|
hash.each { |var, value|
assert_equal(
data[section][var],
- config[section][var],
+ config[var],
"Got different values at %s/%s" % [section, var]
)
}