Sha256: 69dfee59b81fb087b7d69fc8f12e47924fdac1bca75b8f253c7d3e850ab7632c

Contents?: true

Size: 830 Bytes

Versions: 33

Compression:

Stored size: 830 Bytes

Contents

require 'spec_helper'

include SpecInfra::Helper::SmartOS

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.16.0 spec/smartos/process_spec.rb
serverspec-1.15.0 spec/smartos/process_spec.rb
serverspec-1.14.0 spec/smartos/process_spec.rb
serverspec-1.13.0 spec/smartos/process_spec.rb
serverspec-1.12.0 spec/smartos/process_spec.rb
serverspec-1.11.0 spec/smartos/process_spec.rb
serverspec-1.10.0 spec/smartos/process_spec.rb
serverspec-1.9.1 spec/smartos/process_spec.rb
serverspec-1.9.0 spec/smartos/process_spec.rb
serverspec-1.8.0 spec/smartos/process_spec.rb
serverspec-1.7.1 spec/smartos/process_spec.rb
serverspec-1.7.0 spec/smartos/process_spec.rb
serverspec-1.6.0 spec/smartos/process_spec.rb
serverspec-1.5.0 spec/smartos/process_spec.rb
serverspec-1.4.2 spec/smartos/process_spec.rb
serverspec-1.4.1 spec/smartos/process_spec.rb
serverspec-1.4.0 spec/smartos/process_spec.rb
serverspec-1.3.0 spec/smartos/process_spec.rb
serverspec-1.2.0 spec/smartos/process_spec.rb
serverspec-1.1.0 spec/smartos/process_spec.rb