Sha256: 945696153274db16fa8e893903cdb2c869d3c1e687d18ee32360e345ce3e00c4

Contents?: true

Size: 817 Bytes

Versions: 21

Compression:

Stored size: 817 Bytes

Contents

module Serverspec::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

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
serverspec-2.10.0 lib/serverspec/type/service.rb
serverspec-2.9.1 lib/serverspec/type/service.rb
serverspec-2.9.0 lib/serverspec/type/service.rb
serverspec-2.8.2 lib/serverspec/type/service.rb
serverspec-2.8.1 lib/serverspec/type/service.rb
serverspec-2.8.0 lib/serverspec/type/service.rb
serverspec-2.7.2 lib/serverspec/type/service.rb
serverspec-2.7.1 lib/serverspec/type/service.rb
serverspec-2.7.0 lib/serverspec/type/service.rb
serverspec-2.6.0 lib/serverspec/type/service.rb
serverspec-2.5.0 lib/serverspec/type/service.rb
serverspec-2.4.0 lib/serverspec/type/service.rb
serverspec-2.3.1 lib/serverspec/type/service.rb
serverspec-2.3.0 lib/serverspec/type/service.rb
serverspec-2.2.0 lib/serverspec/type/service.rb
serverspec-clc-2.1.0 lib/serverspec/type/service.rb
serverspec-2.1.0 lib/serverspec/type/service.rb
serverspec-2.0.1 lib/serverspec/type/service.rb
serverspec-2.0.0 lib/serverspec/type/service.rb
serverspec-2.0.0.beta21 lib/serverspec/type/service.rb