Sha256: fdb9bc3b530c68dce16610c63a600509c4342fb11baadb94b1f0bfbd29baa898

Contents?: true

Size: 754 Bytes

Versions: 18

Compression:

Stored size: 754 Bytes

Contents

test_name 'C14891: Facter should properly detect operatingsystem on Ubuntu after a Facter.clear' do
  tag 'risk:high'

  confine :to, :platform => /ubuntu/

  require "puppet/acceptance/common_utils"

  script_contents = <<-OS_DETECT
  require 'facter'
  Facter['operatingsystem'].value
  Facter.clear
  exit Facter['operatingsystem'].value == 'Ubuntu'
  OS_DETECT

  agents.each do |agent|
    script_dir = agent.tmpdir('ubuntu')
    script_name = File.join(script_dir, "facter_os_detection_test")
    create_remote_file(agent, script_name, script_contents)

    teardown do
      on(agent, "rm -rf '#{script_dir}'")
    end

    on(agent, "#{Puppet::Acceptance::CommandUtils.ruby_command(agent)} #{script_name}", :acceptable_exit_codes => 0)
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
facter-4.0.29 acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-4.0.28 acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.2.cfacter.20181217 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.1.cfacter.20181031 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.6.cfacter.20181031 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.1.cfacter.20181023 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.5.cfacter.20181022 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.0.cfacter.20181004 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.0.cfacter.20181001 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.12.0.cfacter.20180918 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.4.cfacter.20180821 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.3.cfacter.20180716 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.2.cfacter.20180612 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.9.6.cfacter.20180612 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.2.cfacter.20180606 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.9.6.cfacter.20180606 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
facter-3.11.0.cfacter.20180319 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb
cfacter-3.11.0.rc.20180314 ext/facter/facter/acceptance/tests/facts/operatingsystem_detection_after_clear_on_ubuntu.rb