diff options
| author | Luke Kanies <luke@madstop.com> | 2009-02-19 16:51:50 -0600 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2009-02-19 17:51:22 -0600 |
| commit | c0d5037d11643fd551fdc9f20a9e0ba196c5345a (patch) | |
| tree | c206a8dcd267b61d6ed1bf17d374558126672992 /test/puppet | |
| parent | 262937ff6e505bbf86d15500279ff23398f9e1c8 (diff) | |
| download | puppet-c0d5037d11643fd551fdc9f20a9e0ba196c5345a.tar.gz puppet-c0d5037d11643fd551fdc9f20a9e0ba196c5345a.tar.xz puppet-c0d5037d11643fd551fdc9f20a9e0ba196c5345a.zip | |
Removing or fixing old tests
Most of these were just obsolete tests that have
been sitting around and broke with recent internal
changes.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test/puppet')
| -rwxr-xr-x | test/puppet/conffiles.rb | 107 |
1 files changed, 0 insertions, 107 deletions
diff --git a/test/puppet/conffiles.rb b/test/puppet/conffiles.rb deleted file mode 100755 index 750570d23..000000000 --- a/test/puppet/conffiles.rb +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env ruby - -require File.dirname(__FILE__) + '/../lib/puppettest' - -require 'puppettest' - -class TestConfFiles < Test::Unit::TestCase - include PuppetTest - - @@gooddata = [ - { - "fun" => { - "a" => "b", - "c" => "d", - "e" => "f" - }, - "yay" => { - "aa" => "bk", - "ca" => "dk", - "ea" => "fk" - }, - "boo" => { - "eb" => "fb" - }, - }, - { - "puppet" => { - "yay" => "rah" - }, - "booh" => { - "okay" => "rah" - }, - "back" => { - "yayness" => "rah" - }, - } - ] - - def data2config(data) - str = "" - - if data.include?("puppet") - # because we're modifying it - data = data.dup - str += "[puppet]\n" - data["puppet"].each { |var, value| - str += "%s = %s\n" % [var, value] - } - data.delete("puppet") - end - - data.each { |type, settings| - str += "[%s]\n" % type - settings.each { |var, value| - str += "%s = %s\n" % [var, value] - } - } - - return str - end - - def sampledata - if block_given? - @@gooddata.each { |hash| yield hash } - else - return @@gooddata[0] - end - end - - def test_readconfig - path = tempfile() - - sampledata { |data| - config = Puppet::Util::Settings.new - data.each { |section, hash| - hash.each { |param, value| - config.setdefaults(section, param => [value, value]) - } - } - # Write it out as a config file - File.open(path, "w") { |f| f.print data2config(data) } - assert_nothing_raised { - config.parse(path) - } - - data.each { |section, hash| - hash.each { |var, value| - assert_equal( - data[section][var], - config[var], - "Got different values at %s/%s" % [section, var] - ) - } - } - } - end - - # Make sure that basic config generation works; this also ensures - # that the default config is free of simple typos etc. - def test_genconfig - assert_nothing_raised { - Puppet::settings::to_config - } - end - -end - |
