Codebase list facter / 3e57fb8
Merge pull request #1915 from florindragos/FACT-2515 Gheorghe Popescu authored 4 years ago GitHub committed 4 years ago
1 changed file(s) with 3 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
5656 step "should log that it creates cache file and it caches custom facts found in facter.conf" do
5757 on(agent, facter("#{custom_fact_name} --debug", environment: env)) do |facter_result|
5858 assert_equal(custom_fact_value, facter_result.stdout.chomp, "#{custom_fact_name} value changed")
59 assert_match(/Custom facts cache file expired\/missing. Refreshing/, facter_result.stderr,
59 assert_match(/facts cache file expired\/missing/, facter_result.stderr,
6060 'Expected debug message to state that custom facts cache file is missing or expired')
61 assert_match(/Saving cached custom facts to ".+"/, facter_result.stderr,
61 assert_match(/Saving cached custom facts to ".+"|caching values for cached-custom-facts facts/, facter_result.stderr,
6262 'Expected debug message to state that custom facts will be cached')
6363 end
6464 end
7474
7575 step 'should read from the cached file for a custom fact that has been cached' do
7676 on(agent, facter("#{custom_fact_name} --debug", environment: env)) do |facter_result|
77 assert_match(/Loading cached custom facts from file ".+"/, facter_result.stderr,
77 assert_match(/Loading cached custom facts from file ".+"|loading cached values for cached-custom-facts facts/, facter_result.stderr,
7878 'Expected debug message to state that cached custom facts are read from file')
7979 end
8080 end