The first round of bug-fixes in preparation for beaker
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@2714 980ebf18-57e1-0310-9a29-db15c13687c0
This commit is contained in:
Родитель
5d7c5c9cad
Коммит
b9dd7ee7e2
|
@ -114,6 +114,11 @@ class Puppet::Type
|
|||
def self.provide(name, options = {}, &block)
|
||||
name = Puppet::Util.symbolize(name)
|
||||
|
||||
if obj = @providers[name]
|
||||
Puppet.debug "Reloading %s %s provider" % [name, self.name]
|
||||
unprovide(name)
|
||||
end
|
||||
|
||||
parent = if pname = options[:parent]
|
||||
options.delete(:parent)
|
||||
if pname.is_a? Class
|
||||
|
|
|
@ -44,8 +44,10 @@ class CollExpr < AST::Branch
|
|||
|
||||
case @oper
|
||||
when "and", "or":
|
||||
raise Puppet::ParseError, "Puppet does not currently support collecting exported resources with more than one condition"
|
||||
#oper = @oper.upcase
|
||||
if form == :exported
|
||||
raise Puppet::ParseError, "Puppet does not currently support collecting exported resources with more than one condition"
|
||||
end
|
||||
oper = @oper.upcase
|
||||
when "==": oper = "="
|
||||
else
|
||||
oper = @oper
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# Manage NetInfo POSIX objects. Probably only used on OS X, but I suppose
|
||||
# it could be used elsewhere.
|
||||
require 'puppet/provider/nameservice/netinfo'
|
||||
require 'puppet/provider/host/netinfo'
|
||||
|
||||
Puppet::Type.type(:host).provide :netinfo, :parent => Puppet::Provider::NameService::NetInfo,
|
||||
:netinfodir => "machines" do
|
||||
|
|
|
@ -398,17 +398,17 @@ class TestLangFunctions < Test::Unit::TestCase
|
|||
interp = mkinterp
|
||||
scope = mkscope(:interp => interp)
|
||||
|
||||
fun = interp.newdefine("fun::test")
|
||||
fun = interp.newdefine("yay::ness")
|
||||
foo = interp.newdefine("foo::bar")
|
||||
|
||||
search = Puppet::Parser::Functions.function(:search)
|
||||
assert_nothing_raised do
|
||||
scope.function_search(["foo", "fun"])
|
||||
scope.function_search(["foo", "yay"])
|
||||
end
|
||||
|
||||
ffun = ffoo = nil
|
||||
assert_nothing_raised do
|
||||
ffun = scope.finddefine("test")
|
||||
assert_nothing_raised("Search path change did not work") do
|
||||
ffun = scope.finddefine("ness")
|
||||
ffoo = scope.finddefine('bar')
|
||||
end
|
||||
|
||||
|
|
|
@ -66,6 +66,12 @@ class AptPackageProviderTest < PuppetTest::TestCase
|
|||
'--purge',
|
||||
'faff'
|
||||
).returns(0)
|
||||
pkg.provider.expects(
|
||||
:dpkg
|
||||
).with(
|
||||
'--purge',
|
||||
'faff'
|
||||
).returns(0)
|
||||
|
||||
pkg.evaluate.each { |state| state.transaction = self; state.forward }
|
||||
end
|
||||
|
@ -134,6 +140,12 @@ class AptPackageProviderTest < PuppetTest::TestCase
|
|||
'--purge',
|
||||
'faff'
|
||||
).returns(0)
|
||||
pkg.provider.expects(
|
||||
:dpkg
|
||||
).with(
|
||||
'--purge',
|
||||
'faff'
|
||||
).returns(0)
|
||||
|
||||
pkg.evaluate.each { |state| state.transaction = self; state.forward }
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче