summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-30 04:07:52 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2005-10-30 04:07:52 +0000
commitba76eb2da506aee52b5bbbce842fa5ac361540a0 (patch)
tree10016d5b84c55993c5e9391142733a78981de453 /test
parente605a5c181ef8cd2ec57384c7816bf1f7980aedb (diff)
downloadpuppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.tar.gz
puppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.tar.xz
puppet-ba76eb2da506aee52b5bbbce842fa5ac361540a0.zip
Cleaning up tests resulting from the changes to the parser
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@737 980ebf18-57e1-0310-9a29-db15c13687c0
Diffstat (limited to 'test')
-rwxr-xr-xtest/language/snippets.rb2
-rw-r--r--test/puppettest.rb5
-rw-r--r--test/tagging/tagging.rb2
-rw-r--r--test/types/basic.rb2
-rwxr-xr-xtest/types/cron.rb4
-rw-r--r--test/types/type.rb20
6 files changed, 10 insertions, 25 deletions
diff --git a/test/language/snippets.rb b/test/language/snippets.rb
index 3749ea24d..3d9808091 100755
--- a/test/language/snippets.rb
+++ b/test/language/snippets.rb
@@ -221,7 +221,7 @@ class TestSnippets < Test::Unit::TestCase
}
assert_nothing_raised {
- assert_equal(%w{puppet[top] testing[testing] component[componentname] /tmp/classtest}, obj.path)
+ assert_equal(%w{puppet[top] testing[testing] component[componentname] /tmp/classtest}.to_s, obj.path)
#Puppet.err obj.path
}
diff --git a/test/puppettest.rb b/test/puppettest.rb
index ccaa027cd..d38de89a2 100644
--- a/test/puppettest.rb
+++ b/test/puppettest.rb
@@ -1,10 +1,11 @@
-require 'test/unit'
-
libdir = File.join(File.dirname(__FILE__), '../lib')
unless $:.include?(libdir)
$:.unshift libdir
end
+require 'puppet'
+require 'test/unit'
+
module TestPuppet
def newcomp(name,*ary)
comp = Puppet::Type::Component.create(
diff --git a/test/tagging/tagging.rb b/test/tagging/tagging.rb
index 260e0e53a..2cd1e18b3 100644
--- a/test/tagging/tagging.rb
+++ b/test/tagging/tagging.rb
@@ -71,7 +71,7 @@ class TestTagging < Test::Unit::TestCase
object = objects.shift
assert_nothing_raised {
- assert_equal(%w{solaris file /etc/passwd}, object.tags,
+ assert_equal(%w{solaris}, object.tags,
"Incorrect tags")
}
end
diff --git a/test/types/basic.rb b/test/types/basic.rb
index 4ad6d559b..8cc5e406c 100644
--- a/test/types/basic.rb
+++ b/test/types/basic.rb
@@ -110,7 +110,7 @@ class TestBasic < Test::Unit::TestCase
def test_paths
[@configfile,@sleeper,@component].each { |obj|
assert_nothing_raised {
- assert(obj.path.is_a?(Array))
+ assert_instance_of(String, obj.path)
}
}
end
diff --git a/test/types/cron.rb b/test/types/cron.rb
index ffefba3c1..f26dd69ef 100755
--- a/test/types/cron.rb
+++ b/test/types/cron.rb
@@ -166,7 +166,7 @@ class TestExec < Test::Unit::TestCase
cronback
Puppet::Type::Cron.crontype.remove(@me)
- cron = mkcron("crontest")
+ cron = mkcron("testwithnotab")
cyclecron(cron)
cronrestore
end
@@ -178,7 +178,7 @@ class TestExec < Test::Unit::TestCase
"1 1 1 1 * date > %s/crontesting\n" % testdir()
)
- cron = mkcron("crontest")
+ cron = mkcron("testwithtab")
cyclecron(cron)
cronrestore
end
diff --git a/test/types/type.rb b/test/types/type.rb
index 55b809372..87ca8077a 100644
--- a/test/types/type.rb
+++ b/test/types/type.rb
@@ -122,27 +122,11 @@ class TestType < Test::Unit::TestCase
)
}
- # Make an identical statement
- assert_nothing_raised {
- Puppet::Type::PFile.create(
- :path => file,
- :owner => ["root", "bin"]
- )
- }
-
- # Create a conflicting statement
+ # Make sure no other statements are allowed
assert_raise(Puppet::Error) {
Puppet::Type::PFile.create(
:path => file,
- :owner => ["root", "bin", "adm"]
- )
- }
-
- # And then make an intersection with one valid value
- assert_nothing_raised {
- Puppet::Type::PFile.create(
- :path => file,
- :owner => "root"
+ :group => "root"
)
}
end