# This test is intended to demonstrate that setting the cli.trace field to true # enables backtrace reporting for errors in custom facts. test_name "C99988: trace config field enables backtraces for custom facts" do tag 'risk:high' require 'facter/acceptance/user_fact_utils' extend Facter::Acceptance::UserFactUtils erroring_custom_fact = < [0, 1]) end step "trace setting should provide a backtrace for a custom fact with errors" do on(agent, facter("--custom-dir '#{custom_dir}' custom_fact"), :acceptable_exit_codes => [1]) do |facter_output| assert_match(/backtrace:\s+#{custom_fact}/, facter_output.stderr, "Expected a backtrace for erroneous custom fact") end end end end end