summaryrefslogtreecommitdiffstats
path: root/test/network
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-29 11:50:17 -0600
committerLuke Kanies <luke@madstop.com>2008-02-29 11:50:17 -0600
commit7ca0ad64f486c5dc50513e6d06c8e0725ce4f7f8 (patch)
tree4e74fcdc936b363d4bc2b001fb034242164d983f /test/network
parent43aea83eb1ac388566246e5418394e31a4cad697 (diff)
downloadpuppet-7ca0ad64f486c5dc50513e6d06c8e0725ce4f7f8.tar.gz
puppet-7ca0ad64f486c5dc50513e6d06c8e0725ce4f7f8.tar.xz
puppet-7ca0ad64f486c5dc50513e6d06c8e0725ce4f7f8.zip
Fixing a test that changed the environment for all later tests,
thus breaking some of them.
Diffstat (limited to 'test/network')
-rwxr-xr-xtest/network/client/master.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/test/network/client/master.rb b/test/network/client/master.rb
index 67c47fa6d..41796575f 100755
--- a/test/network/client/master.rb
+++ b/test/network/client/master.rb
@@ -216,15 +216,7 @@ end
name = "environment"
value = "test_environment"
- Puppet[:filetimeout] = -1
- Puppet[:factsource] = tempfile()
- Dir.mkdir(Puppet[:factsource])
- file = File.join(Puppet[:factsource], "#{name}.rb")
- File.open(file, "w") do |f|
- f.puts %{Facter.add("#{name}") do setcode { "#{value}" } end }
- end
-
- Puppet::Network::Client.master.getfacts
+ Facter.stubs(:to_hash).returns(name => value)
assert_equal(value, Puppet::Network::Client.master.facts[name])
end