Sha256: 9fb8020d51d930974ecc886bcb9e9a7a2f2dbdc2028246f8b6aa2a3a77ddd1e3

Contents?: true

Size: 883 Bytes

Versions: 11

Compression:

Stored size: 883 Bytes

Contents

module Serverspec
  module Type
    class Service < Base
      def enabled?(level=3)
        @runner.check_service_is_enabled(@name, level)
      end

      def installed?(name, version)
        @runner.check_service_is_installed(@name)
      end

      def has_start_mode?(mode)
        @runner.check_service_has_start_mode(@name, mode)
      end

      def running?(under)
        if under
          check_method = "check_service_is_running_under_#{under}".to_sym
          @runner.send(check_method, @name)
        else
          @runner.check_service_is_running(@name)
        end
      end

      def monitored_by?(monitor)
        check_method = "check_service_is_monitored_by_#{monitor}".to_sym
        res = @runner.send(check_method, @name)
      end

      def has_property?(property)
        @runner.check_service_has_property(@name, property)
      end
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
serverspec-2.0.0.beta19 lib/serverspec/type/service.rb
serverspec-2.0.0.beta18 lib/serverspec/type/service.rb
serverspec-2.0.0.beta17 lib/serverspec/type/service.rb
serverspec-2.0.0.beta16 lib/serverspec/type/service.rb
serverspec-2.0.0.beta15 lib/serverspec/type/service.rb
serverspec-2.0.0.beta14 lib/serverspec/type/service.rb
serverspec-2.0.0.beta13 lib/serverspec/type/service.rb
serverspec-2.0.0.beta12 lib/serverspec/type/service.rb
serverspec-2.0.0.beta11 lib/serverspec/type/service.rb
serverspec-2.0.0.beta10 lib/serverspec/type/service.rb
serverspec-2.0.0.beta9 lib/serverspec/type/service.rb