Sha256: ff0b636bf8c75845c3fa556852cf9e01df6d34c7137a0066e1fdc569cd0d73f5
Contents?: true
Size: 1.03 KB
Versions: 8
Compression:
Stored size: 1.03 KB
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 /proc/1/exe is present and points to 'systemd'", :if => File.exist?('/proc/1/exe') && Puppet::FileSystem.readlink('/proc/1/exe').include?('systemd') do expect(provider_class).to be_suitable end it "should not be considered suitable if /proc/1/exe is present it does not point to 'systemd'", :if => File.exist?('/proc/1/exe') && !Puppet::FileSystem.readlink('/proc/1/exe').include?('systemd') do expect(provider_class).not_to be_suitable end it "should not be considered suitable if /proc/1/exe is absent", :if => !File.exist?('/proc/1/exe') do expect(provider_class).not_to be_suitable end end
Version data entries
8 entries across 8 versions & 1 rubygems