summaryrefslogtreecommitdiffstats
path: root/test/ral/providers/service
diff options
context:
space:
mode:
authorIan Taylor <ian@lorf.org>2009-06-05 12:38:35 -0400
committerJames Turnbull <james@lovedthanlost.net>2009-06-06 09:11:28 +1000
commit41ce18cc8ea239d1633fc6cd9e9f599957a82e74 (patch)
tree9d398b4e3e6d726a174b5b57094c7dd6749ccf0e /test/ral/providers/service
parentf3b40923605420f774dac298fb1708de180c0a81 (diff)
downloadpuppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.tar.gz
puppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.tar.xz
puppet-41ce18cc8ea239d1633fc6cd9e9f599957a82e74.zip
Changed tabs to spaces without interfering with indentation or alignment
Diffstat (limited to 'test/ral/providers/service')
-rwxr-xr-xtest/ral/providers/service/base.rb62
1 files changed, 31 insertions, 31 deletions
diff --git a/test/ral/providers/service/base.rb b/test/ral/providers/service/base.rb
index c11ce4801..03ecca59d 100755
--- a/test/ral/providers/service/base.rb
+++ b/test/ral/providers/service/base.rb
@@ -8,32 +8,32 @@ require File.dirname(__FILE__) + '/../../../lib/puppettest'
require 'puppettest'
class TestBaseServiceProvider < Test::Unit::TestCase
- include PuppetTest
+ include PuppetTest
- def test_base
- running = tempfile()
-
- commands = {}
- %w{touch rm test}.each do |c|
- path = %x{which #{c}}.chomp
- if path == ""
- $stderr.puts "Cannot find '#{c}'; cannot test base service provider"
- return
+ def test_base
+ running = tempfile()
+
+ commands = {}
+ %w{touch rm test}.each do |c|
+ path = %x{which #{c}}.chomp
+ if path == ""
+ $stderr.puts "Cannot find '#{c}'; cannot test base service provider"
+ return
end
commands[c.to_sym] = path
end
- service = Puppet::Type.type(:service).new(
- :name => "yaytest", :provider => :base,
- :start => "%s %s" % [commands[:touch], running],
- :status => "%s -f %s" % [commands[:test], running],
- :stop => "%s %s" % [commands[:rm], running]
- )
-
- provider = service.provider
- assert(provider, "did not get base provider")
-
- assert_nothing_raised do
- provider.start
+ service = Puppet::Type.type(:service).new(
+ :name => "yaytest", :provider => :base,
+ :start => "%s %s" % [commands[:touch], running],
+ :status => "%s -f %s" % [commands[:test], running],
+ :stop => "%s %s" % [commands[:rm], running]
+ )
+
+ provider = service.provider
+ assert(provider, "did not get base provider")
+
+ assert_nothing_raised do
+ provider.start
end
assert(FileTest.exists?(running), "start was not called correctly")
assert_nothing_raised do
@@ -51,16 +51,16 @@ class TestBaseServiceProvider < Test::Unit::TestCase
# Testing #454
def test_that_failures_propagate
nope = "/no/such/command"
- service = Puppet::Type.type(:service).new(
- :name => "yaytest", :provider => :base,
- :start => nope,
- :status => nope,
- :stop => nope,
- :restart => nope
- )
+ service = Puppet::Type.type(:service).new(
+ :name => "yaytest", :provider => :base,
+ :start => nope,
+ :status => nope,
+ :stop => nope,
+ :restart => nope
+ )
- provider = service.provider
- assert(provider, "did not get base provider")
+ provider = service.provider
+ assert(provider, "did not get base provider")
# We can't fail well when status is messed up, because we depend on the return code
# of the command for data.