summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2005-07-18 19:51:51 +0000
committerLuke Kanies <luke@madstop.com>2005-07-18 19:51:51 +0000
commitb1f3fb8a9beb7a5c8407107b96d5c615f4504b7a (patch)
treee3d8e4e3c02c8860b0ca9759211a35e35b462eba /test
parent357afbbc6054dcdc7a1fd5ae468a2e86a44a9bde (diff)
downloadpuppet-b1f3fb8a9beb7a5c8407107b96d5c615f4504b7a.tar.gz
puppet-b1f3fb8a9beb7a5c8407107b96d5c615f4504b7a.tar.xz
puppet-b1f3fb8a9beb7a5c8407107b96d5c615f4504b7a.zip
switching facts to be auto-provided by the client
git-svn-id: https://reductivelabs.com/svn/puppet/library/trunk@415 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rw-r--r--test/other/tc_fact.rb7
-rw-r--r--test/other/tc_transactions.rb4
-rw-r--r--test/types/tc_basic.rb4
-rw-r--r--test/types/tc_query.rb4
4 files changed, 10 insertions, 9 deletions
diff --git a/test/other/tc_fact.rb b/test/other/tc_fact.rb
index f0a2cc223..34f053dc0 100644
--- a/test/other/tc_fact.rb
+++ b/test/other/tc_fact.rb
@@ -5,6 +5,7 @@ if __FILE__ == $0
end
require 'puppet/fact'
+require 'facter'
require 'test/unit'
# $Id$
@@ -25,4 +26,10 @@ class TestFacts < Test::Unit::TestCase
Puppet::Fact["funtest"]
)
end
+
+ def test_os
+ assert_equal(Facter["operatingsystem"].value,
+ Puppet::Fact["operatingsystem"]
+ )
+ end
end
diff --git a/test/other/tc_transactions.rb b/test/other/tc_transactions.rb
index 03c5134e2..a1976e12b 100644
--- a/test/other/tc_transactions.rb
+++ b/test/other/tc_transactions.rb
@@ -46,11 +46,9 @@ class TestTransactions < Test::Unit::TestCase
unless Puppet::Type::Service.has_key?("sleeper")
Puppet::Type::Service.new(
:name => "sleeper",
+ :path => File.join($puppetbase,"examples/root/etc/init.d"),
:check => [:running]
)
- Puppet::Type::Service.setpath(
- File.join($puppetbase,"examples/root/etc/init.d")
- )
end
return Puppet::Type::Service["sleeper"]
}
diff --git a/test/types/tc_basic.rb b/test/types/tc_basic.rb
index d3519a9be..a283c3e04 100644
--- a/test/types/tc_basic.rb
+++ b/test/types/tc_basic.rb
@@ -39,11 +39,9 @@ class TestBasic < Test::Unit::TestCase
assert_nothing_raised() {
@sleeper = Puppet::Type::Service.new(
:name => "sleeper",
+ :path => File.join($puppetbase,"examples/root/etc/init.d"),
:running => 1
)
- Puppet::Type::Service.setpath(
- File.join($puppetbase,"examples/root/etc/init.d")
- )
}
assert_nothing_raised() {
@component.push(
diff --git a/test/types/tc_query.rb b/test/types/tc_query.rb
index 242e160ff..f127d1dfe 100644
--- a/test/types/tc_query.rb
+++ b/test/types/tc_query.rb
@@ -42,11 +42,9 @@ class TestQuery < Test::Unit::TestCase
unless Puppet::Type::Service.has_key?("sleeper")
Puppet::Type::Service.new(
:name => "sleeper",
+ :path => File.join($puppetbase,"examples/root/etc/init.d"),
:check => [:running]
)
- Puppet::Type::Service.setpath(
- File.join($puppetbase,"examples/root/etc/init.d")
- )
end
@sleeper = Puppet::Type::Service["sleeper"]
}