Sha256: 367a1ccba4aaabd7d6cae2f3f13ce344e009651af976acf04a7aed4687f6ce4f

Contents?: true

Size: 935 Bytes

Versions: 40

Compression:

Stored size: 935 Bytes

Contents

require 'spec_helper'

test_title = 'Integration Tests for Puppet::Type::Service::Provider::Systemd'

describe test_title, unless: Puppet::Util::Platform.jruby? do
  let(:provider_class) { Puppet::Type.type(:service).provider(:systemd) }

  # 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(provider_class).to be_suitable
  end

  it "should be considered suitable if /usr/bin/systemctl is present", :if => File.executable?('/usr/bin/systemctl')  do
    expect(provider_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(provider_class).not_to be_suitable
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
puppet-6.7.2 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.2-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.2-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.2-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-6.7.0 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.0-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.0-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.7.0-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-6.4.3 spec/integration/provider/service/systemd_spec.rb
puppet-6.4.3-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.4.3-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.4.3-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-6.0.10 spec/integration/provider/service/systemd_spec.rb
puppet-6.0.10-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.0.10-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.0.10-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-6.6.0 spec/integration/provider/service/systemd_spec.rb
puppet-6.6.0-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.6.0-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-6.6.0-universal-darwin spec/integration/provider/service/systemd_spec.rb