Sha256: f63d17240ecdc5aecf29c8d574e7a00605f834d5ac37f23bc108919a57ba56a6

Contents?: true

Size: 820 Bytes

Versions: 234

Compression:

Stored size: 820 Bytes

Contents

#! /usr/bin/env ruby

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

234 entries across 234 versions & 1 rubygems

Version Path
puppet-4.10.1 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.1-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.1-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.1-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-4.10.0 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.0-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.0-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.10.0-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-4.9.4 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.4-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.4-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.4-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-4.9.3 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.3-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.3-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.3-universal-darwin spec/integration/provider/service/systemd_spec.rb
puppet-4.9.2 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.2-x86-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.2-x64-mingw32 spec/integration/provider/service/systemd_spec.rb
puppet-4.9.2-universal-darwin spec/integration/provider/service/systemd_spec.rb