Fixed additional environments tests
This commit is contained in:
Родитель
79bb1f201c
Коммит
06edac4a23
|
@ -45,7 +45,7 @@ describe Puppet::Node, "when initializing" do
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should accept an environment value" do
|
it "should accept an environment value" do
|
||||||
Puppet.settings.stubs(:value).with(:environments).returns("myenv")
|
Puppet.settings.stubs(:value).with(:environment).returns("myenv")
|
||||||
@node = Puppet::Node.new("testing", :environment => "myenv")
|
@node = Puppet::Node.new("testing", :environment => "myenv")
|
||||||
@node.environment.should == "myenv"
|
@node.environment.should == "myenv"
|
||||||
end
|
end
|
||||||
|
@ -53,7 +53,7 @@ end
|
||||||
|
|
||||||
describe Puppet::Node, "when returning the environment" do
|
describe Puppet::Node, "when returning the environment" do
|
||||||
before do
|
before do
|
||||||
Puppet.settings.stubs(:value).with(:environments).returns("one,two")
|
Puppet.settings.stubs(:value).with(:environment).returns("one,two")
|
||||||
Puppet.settings.stubs(:value).with(:environment).returns("one")
|
Puppet.settings.stubs(:value).with(:environment).returns("one")
|
||||||
@node = Puppet::Node.new("testnode")
|
@node = Puppet::Node.new("testnode")
|
||||||
end
|
end
|
||||||
|
|
|
@ -419,8 +419,7 @@ end
|
||||||
assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
|
assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
|
||||||
|
|
||||||
# Now set it to a real value
|
# Now set it to a real value
|
||||||
Puppet[:environments] = "something,else"
|
Puppet[:environment] = "something"
|
||||||
Puppet[:environment] = "something"
|
|
||||||
facts = Puppet::Network::Client::Master.facts
|
facts = Puppet::Network::Client::Master.facts
|
||||||
assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
|
assert_equal(facts["environment"], Puppet[:environment], "Did not add environment to client facts")
|
||||||
end
|
end
|
||||||
|
|
Загрузка…
Ссылка в новой задаче