Sha256: 3118473f00923f37ae212517c69e8ba94d6490ca51c5580d8582aedaee3a82cf

Contents?: true

Size: 798 Bytes

Versions: 12

Compression:

Stored size: 798 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 /bin/systemctl is present", :if => File.executable?('/bin/systemctl') do
    expect(described_class).to be_suitable
  end

  it "should be considered suitable if /usr/bin/systemctl is present", :if => File.executable?('/usr/bin/systemctl')  do
    expect(described_class).to be_suitable
  end

  it "should not be cosidered suitable if systemctl is absent",
    :unless => (File.executable?('/bin/systemctl') or File.executable?('/usr/bin/systemctl')) do
    expect(described_class).not_to be_suitable
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
puppet-5.5.16 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.16-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.16-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.16-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.14 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.14-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.14-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.14-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-5.5.13 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.13-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.13-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-5.5.13-universal-darwin spec/integration/provider/service/systemd_spec.rb