summaryrefslogtreecommitdiffstats
path: root/test/other/events.rb
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-24 15:58:07 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-11-24 15:58:07 +0000
commit5ce5b95af489685f64dbaa6189f7569e976e9dc5 (patch)
tree370d6d0510d32f4742377b11b0e070cdb103b887 /test/other/events.rb
parent84bf2896a80bc527f345e49ffb8fb1b5817fdfe6 (diff)
downloadpuppet-5ce5b95af489685f64dbaa6189f7569e976e9dc5.tar.gz
puppet-5ce5b95af489685f64dbaa6189f7569e976e9dc5.tar.xz
puppet-5ce5b95af489685f64dbaa6189f7569e976e9dc5.zip
removing any direct references to /tmp in tests
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@757 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test/other/events.rb')
-rwxr-xr-xtest/other/events.rb15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/other/events.rb b/test/other/events.rb
index 61551983e..f295608f1 100755
--- a/test/other/events.rb
+++ b/test/other/events.rb
@@ -18,8 +18,9 @@ class TestEvents < Test::Unit::TestCase
end
def test_simplesubscribe
+ name = tempfile()
file = Puppet::Type::PFile.create(
- :name => "/tmp/eventtestingA",
+ :name => name,
:create => true
)
exec = Puppet::Type::Exec.create(
@@ -29,8 +30,6 @@ class TestEvents < Test::Unit::TestCase
:subscribe => [[file.class.name, file.name]]
)
- @@tmpfiles << "/tmp/eventtestingA"
-
comp = newcomp("eventtesting", file, exec)
trans = assert_events(comp, [:file_created], "events")
@@ -39,8 +38,9 @@ class TestEvents < Test::Unit::TestCase
end
def test_simplerequire
+ name = tempfile()
file = Puppet::Type::PFile.create(
- :name => "/tmp/eventtestingA",
+ :name => name,
:create => true
)
exec = Puppet::Type::Exec.create(
@@ -50,7 +50,6 @@ class TestEvents < Test::Unit::TestCase
:require => [[file.class.name, file.name]]
)
- @@tmpfiles << "/tmp/eventtestingA"
comp = Puppet::Type::Component.create(
:name => "eventtesting"
@@ -67,14 +66,14 @@ class TestEvents < Test::Unit::TestCase
assert_equal(0, trans.triggered?(exec, :refresh))
end
- def test_zladderrequire
+ def test_ladderrequire
comps = {}
objects = {}
- fname = "/tmp/eventtestfuntest"
+ fname = tempfile()
[:a, :b].each { |l|
case l
when :a
- name = "/tmp/eventtesting%s" % l
+ name = tempfile() + l.to_s
objects[l] = Puppet::Type::PFile.create(
:name => name,
:create => true