~ubuntu-branches/ubuntu/oneiric/puppet/oneiric-security

« back to all changes in this revision

Viewing changes to test/puppet/conffiles.rb

  • Committer: Bazaar Package Importer
  • Author(s): Micah Anderson
  • Date: 2008-07-26 15:43:45 UTC
  • mto: (3.1.1 lenny) (1.3.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 16.
  • Revision ID: james.westby@ubuntu.com-20080726154345-1fmgo76b4l72ulvc
ImportĀ upstreamĀ versionĀ 0.24.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env ruby
2
2
 
3
 
$:.unshift("../lib").unshift("../../lib") if __FILE__ =~ /\.rb$/
 
3
require File.dirname(__FILE__) + '/../lib/puppettest'
4
4
 
5
 
require 'puppet'
6
 
require 'puppet/config'
7
5
require 'puppettest'
8
6
 
9
7
class TestConfFiles < Test::Unit::TestCase
73
71
        path = tempfile()
74
72
 
75
73
        sampledata { |data|
76
 
            config = Puppet::Config.new
 
74
            config = Puppet::Util::Settings.new
77
75
            data.each { |section, hash|
78
76
                hash.each { |param, value|
79
77
                    config.setdefaults(section, param => [value, value])
96
94
            }
97
95
        }
98
96
    end
 
97
 
 
98
    # Make sure that basic config generation works; this also ensures
 
99
    # that the default config is free of simple typos etc.
 
100
    def test_genconfig
 
101
        assert_nothing_raised {
 
102
            Puppet::settings::to_config
 
103
        }
 
104
    end
 
105
 
99
106
end
100
107
 
101
 
# $Id: conffiles.rb 1793 2006-10-16 22:01:40Z luke $