Sha256: 5539608088936719ea544ea4a2fc091dbeb57becd5fb4b6f90907f3ba4dab7c3

Contents?: true

Size: 826 Bytes

Versions: 33

Compression:

Stored size: 826 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::AIX

describe process("memcached") do
  let(:stdout) { " 1407\n" }
  its(:pid) { should eq 1407 }
  its(:command) { should eq "ps -C memcached -o pid= | head -1" }
end

describe process("memcached") do
  let(:stdout) { "/usr/bin/memcached -m 14386 -p 11211 -u nobody -l 10.11.1.53 -c 30000\n" }
  its(:args) { should match /-c 30000\b/ }
  its(:command) { should eq "ps -C memcached -o args= | head -1" }
end

describe process("memcached") do
  context "when running" do
    let(:stdout) { " 1407\n" }
    it { should be_running }
    its(:command) { should eq "ps -C memcached -o pid= | head -1" }
  end

  context "when not running" do
    let(:stdout) { " 1407\n" }
    it { should be_running }
    its(:command) { should eq "ps -C memcached -o pid= | head -1" }
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
serverspec-1.0.0 spec/aix/process_spec.rb
serverspec-0.16.0 spec/aix/process_spec.rb
serverspec-0.15.5 spec/aix/process_spec.rb
serverspec-0.15.4 spec/aix/process_spec.rb
serverspec-0.15.3 spec/aix/process_spec.rb
serverspec-0.15.2 spec/aix/process_spec.rb
serverspec-0.15.1 spec/aix/process_spec.rb
serverspec-0.15.0 spec/aix/process_spec.rb
serverspec-0.14.4 spec/aix/process_spec.rb
serverspec-0.14.3 spec/aix/process_spec.rb
serverspec-0.14.2 spec/aix/process_spec.rb
serverspec-0.14.1 spec/aix/process_spec.rb
serverspec-0.14.0 spec/aix/process_spec.rb