summaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
authorIan Taylor <ian@lorf.org>2009-06-05 12:39:04 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-06-06 09:12:00 +1000
commit4f2c066a97e59a89df64af4b25beac6f3f0553c2 (patch)
tree126540beec3c65448e01e1b48d27275ec4ee6ea4 /test/lib
parent97e6975d69f239e24993315a25a3117b1daa48c3 (diff)
downloadpuppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.gz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.tar.xz
puppet-4f2c066a97e59a89df64af4b25beac6f3f0553c2.zip
Removed extra whitespace from end of lines
Diffstat (limited to 'test/lib')
-rwxr-xr-xtest/lib/puppettest.rb8
-rw-r--r--test/lib/puppettest/certificates.rb4
-rw-r--r--test/lib/puppettest/fakes.rb2
-rw-r--r--test/lib/puppettest/parsertesting.rb6
-rw-r--r--test/lib/puppettest/railstesting.rb6
-rw-r--r--test/lib/puppettest/servertest.rb2
-rw-r--r--test/lib/puppettest/support/assertions.rb4
-rwxr-xr-xtest/lib/puppettest/support/resources.rb10
8 files changed, 21 insertions, 21 deletions
diff --git a/test/lib/puppettest.rb b/test/lib/puppettest.rb
index 8c1eed910..786c37074 100755
--- a/test/lib/puppettest.rb
+++ b/test/lib/puppettest.rb
@@ -8,7 +8,7 @@ $LOAD_PATH.unshift(mainlib) unless $LOAD_PATH.include?(mainlib)
require 'puppet'
# include any gems in vendor/gems
-Dir["#{mainlib}/../vendor/gems/**"].each do |path|
+Dir["#{mainlib}/../vendor/gems/**"].each do |path|
libpath = File.join(path, "lib")
if File.directory?(libpath)
$LOAD_PATH.unshift(libpath)
@@ -138,7 +138,7 @@ module PuppetTest
ENV["RUBYLIB"] = curlibs.join(":")
end
-
+
def logcollector
collector = []
Puppet::Util::Log.newdestination(collector)
@@ -217,7 +217,7 @@ module PuppetTest
end
Puppet::Util::Log.level = :debug
#$VERBOSE = 1
- #else
+ #else
# Puppet::Util::Log.close
# Puppet::Util::Log.newdestination(@logs)
# Puppet[:httplog] = tempfile()
@@ -240,7 +240,7 @@ module PuppetTest
@@tmpfiles << f
return f
end
-
+
def textmate?
if ENV["TM_FILENAME"]
return true
diff --git a/test/lib/puppettest/certificates.rb b/test/lib/puppettest/certificates.rb
index fbd18e997..3ba052505 100644
--- a/test/lib/puppettest/certificates.rb
+++ b/test/lib/puppettest/certificates.rb
@@ -42,9 +42,9 @@ module PuppetTest::Certificates
cert = Puppet::SSLCertificates::Certificate.new(:name => hostname)
cert.mkcsr
}
-
+
return cert
- end
+ end
def mksignedcert(ca = nil, hostname = nil)
ca ||= mkCA()
diff --git a/test/lib/puppettest/fakes.rb b/test/lib/puppettest/fakes.rb
index 739b098bc..db6ca4d80 100644
--- a/test/lib/puppettest/fakes.rb
+++ b/test/lib/puppettest/fakes.rb
@@ -153,7 +153,7 @@ module PuppetTest
end
return ret
- end
+ end
def store(hash)
hash.each do |n, v|
diff --git a/test/lib/puppettest/parsertesting.rb b/test/lib/puppettest/parsertesting.rb
index 1a08ecbae..666de076a 100644
--- a/test/lib/puppettest/parsertesting.rb
+++ b/test/lib/puppettest/parsertesting.rb
@@ -14,7 +14,7 @@ module PuppetTest::ParserTesting
def evaluated?
defined? @evaluated and @evaluated
end
-
+
def evaluate(*args)
@evaluated = true
return @evaluate
@@ -25,7 +25,7 @@ module PuppetTest::ParserTesting
@evaluate = val
end
end
-
+
def reset
@evaluated = nil
end
@@ -34,7 +34,7 @@ module PuppetTest::ParserTesting
evaluate()
end
end
-
+
def astarray(*args)
AST::ASTArray.new(
:children => args
diff --git a/test/lib/puppettest/railstesting.rb b/test/lib/puppettest/railstesting.rb
index a9d8601f3..fb5c15f51 100644
--- a/test/lib/puppettest/railstesting.rb
+++ b/test/lib/puppettest/railstesting.rb
@@ -26,7 +26,7 @@ module PuppetTest::RailsTesting
def railsresource(type = "file", title = "/tmp/testing", params = {})
railsteardown
railsinit
-
+
# We need a host for resources
#host = Puppet::Rails::Host.new(:name => Facter.value("hostname"))
@@ -39,12 +39,12 @@ module PuppetTest::RailsTesting
facts = Facter.to_hash
# Now try storing our crap
- host = nil
+ host = nil
node = mknode(facts["hostname"])
node.parameters = facts
assert_nothing_raised {
host = Puppet::Rails::Host.store(node, resources)
- }
+ }
# Now save the whole thing
host.save
diff --git a/test/lib/puppettest/servertest.rb b/test/lib/puppettest/servertest.rb
index 11c24f5b4..d658ddba7 100644
--- a/test/lib/puppettest/servertest.rb
+++ b/test/lib/puppettest/servertest.rb
@@ -63,7 +63,7 @@ module PuppetTest::ServerTest
@@tmppids << spid
# give the server a chance to do its thing
- sleep 1
+ sleep 1
return spid
end
diff --git a/test/lib/puppettest/support/assertions.rb b/test/lib/puppettest/support/assertions.rb
index 2159c8d3e..052c6b42d 100644
--- a/test/lib/puppettest/support/assertions.rb
+++ b/test/lib/puppettest/support/assertions.rb
@@ -15,7 +15,7 @@ module PuppetTest
def assert_uid_gid(uid, gid, filename)
flunk "Must be uid 0 to run these tests" unless Process.uid == 0
- fork do
+ fork do
Puppet::Util::SUIDManager.gid = gid
Puppet::Util::SUIDManager.uid = uid
# FIXME: use the tempfile method from puppettest.rb
@@ -30,7 +30,7 @@ module PuppetTest
f = File.open(filename, "r")
- a = f.readlines
+ a = f.readlines
assert_equal(uid, a[0].chomp.to_i, "UID was incorrect")
assert_equal(gid, a[1].chomp.to_i, "GID was incorrect")
FileUtils.rm(filename)
diff --git a/test/lib/puppettest/support/resources.rb b/test/lib/puppettest/support/resources.rb
index a2beee98d..865995507 100755
--- a/test/lib/puppettest/support/resources.rb
+++ b/test/lib/puppettest/support/resources.rb
@@ -7,14 +7,14 @@ module PuppetTest::Support::Resources
def tree_resource(name)
Puppet::Type.type(:file).new :title => name, :path => "/tmp/#{name}", :mode => 0755
end
-
+
def tree_container(name)
Puppet::Type::Component.create :name => name, :type => "yay"
end
-
+
def treenode(config, name, *resources)
comp = tree_container name
- resources.each do |resource|
+ resources.each do |resource|
if resource.is_a?(String)
resource = tree_resource(resource)
end
@@ -23,7 +23,7 @@ module PuppetTest::Support::Resources
end
return comp
end
-
+
def mktree
catalog = Puppet::Resource::Catalog.new do |config|
one = treenode(config, "one", "a", "b")
@@ -31,7 +31,7 @@ module PuppetTest::Support::Resources
middle = treenode(config, "middle", "e", "f", two)
top = treenode(config, "top", "g", "h", middle, one)
end
-
+
return catalog
end
end