Sha256: fd7779074334a097a9418e26965a9ea8b1227c3158d6b63f7ebad66d9fc984df

Contents?: true

Size: 1.63 KB

Versions: 230

Compression:

Stored size: 1.63 KB

Contents

require 'spec_helper'

describe Specinfra::Command::Module::Service::Daemontools do
  class Specinfra::Command::Module::Service::Daemontools::Test < Specinfra::Command::Base
    extend Specinfra::Command::Module::Service::Daemontools
  end
  let(:klass) { Specinfra::Command::Module::Service::Daemontools::Test }
  it { expect(klass.check_is_enabled_under_daemontools('httpd')).to eq "test -L $([ -d /service ] && echo /service || echo /etc/service)/httpd && test -f $([ -d /service ] && echo /service || echo /etc/service)/httpd/run" }
  it { expect(klass.check_is_running_under_daemontools('httpd')).to eq "svstat $([ -d /service ] && echo /service || echo /etc/service)/httpd | grep -E 'up \\(pid [0-9]+\\)'" }
  it { expect(klass.enable_under_daemontools('httpd', '/tmp/service/httpd')).to eq 'ln -snf /tmp/service/httpd $([ -d /service ] && echo /service || echo /etc/service)/httpd' }
  it { expect(klass.disable_under_daemontools('httpd')).to eq '( cd $([ -d /service ] && echo /service || echo /etc/service)/httpd && rm -f $([ -d /service ] && echo /service || echo /etc/service)/httpd && svc -dx . log )' }
  it { expect(klass.start_under_daemontools('httpd')).to   eq 'svc -u $([ -d /service ] && echo /service || echo /etc/service)/httpd' }
  it { expect(klass.stop_under_daemontools('httpd')).to    eq 'svc -d $([ -d /service ] && echo /service || echo /etc/service)/httpd' }
  it { expect(klass.restart_under_daemontools('httpd')).to eq 'svc -t $([ -d /service ] && echo /service || echo /etc/service)/httpd' }
  it { expect(klass.reload_under_daemontools('httpd')).to  eq 'svc -h $([ -d /service ] && echo /service || echo /etc/service)/httpd' }
end


Version data entries

230 entries across 230 versions & 3 rubygems

Version Path
specinfra-2.60.3 spec/command/module/service/daemontools_spec.rb
specinfra-2.60.2 spec/command/module/service/daemontools_spec.rb
specinfra-2.60.1 spec/command/module/service/daemontools_spec.rb
specinfra-2.60.0 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.6 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.5 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.4 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.3 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.2 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.1 spec/command/module/service/daemontools_spec.rb
specinfra-2.59.0 spec/command/module/service/daemontools_spec.rb
specinfra-2.58.0 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.5 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.4 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.3 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.2 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.1 spec/command/module/service/daemontools_spec.rb
specinfra-cisco-2.41.0 spec/command/module/service/daemontools_spec.rb
specinfra-2.57.0 spec/command/module/service/daemontools_spec.rb
specinfra-2.56.1 spec/command/module/service/daemontools_spec.rb