Sha256: 92dd24457a160a1e989065889f7aabb416eb99339bd3eb25dd901b9a996e19a1

Contents?: true

Size: 918 Bytes

Versions: 24

Compression:

Stored size: 918 Bytes

Contents

require 'spec_helper'

describe Puppet::Type.type(:service).provider(:systemd), '(integration)' do
  # TODO: Unfortunately there does not seem a way to stub the executable
  #       checks in the systemd provider because they happen at load time.

  it "should be considered suitable if /proc/1/comm is present and contains 'systemd'",
    :if => File.exist?('/proc/1/comm') && Puppet::FileSystem.read('/proc/1/comm').include?('systemd') do
    expect(described_class).to be_suitable
  end

  it "should not be considered suitable if /proc/1/comm is present it does not contain 'systemd'",
    :if => File.exist?('/proc/1/comm') && !Puppet::FileSystem.read('/proc/1/comm').include?('systemd') do
    expect(described_class).not_to be_suitable
  end

  it "should not be considered suitable if /proc/1/comm is absent",
    :if => !File.exist?('/proc/1/comm') do
    expect(described_class).not_to be_suitable
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
puppet-5.5.22 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.22-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.22-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.22-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.21 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.21-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.21-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.21-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.20 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.20-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.20-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.20-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.19 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.19-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.19-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.19-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.18 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.18-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.18-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.18-universal-darwin spec/integration/provider/service/systemd_spec.rb