Jira (FACT-2827) option store unit test does not mock facter.conf

8 views
Skip to first unread message

Florin Dragos (Jira)

unread,
Oct 6, 2020, 10:08:08 AM10/6/20
to puppe...@googlegroups.com
Florin Dragos created an issue
 
Facter / Bug FACT-2827
option store unit test does not mock facter.conf
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/10/06 7:07 AM
Priority: Normal Normal
Reporter: Florin Dragos

Having ttls set in the system facter.conf, causes this test to fail:

Failures:

1) Facter::OptionStore#all returns default values
Failure/Error:
expect(option_store.all).to eq(
block: true,
block_list: {},
blocked_facts: [],
cli: nil,
custom_dir: [],
config_file_custom_dir: [],
custom_facts: true,
debug: false,
external_dir: [],

expected: {:block=>true, :block_list=>{}, :blocked_facts=>[], :cache=>true, :cli=>nil, :color=>true, :config=>n...n, :ruby=>true, :show_legacy=>true, :timing=>false, :trace=>false, :user_query=>[], :verbose=>false}
got: {:block=>true, :block_list=>{}, :blocked_facts=>[], :cache=>true, :cli=>nil, :color=>true, :config=>n...=>false, :trace=>false, :ttls=>[\{"external_fact.txt"=>"30 days"}], :user_query=>[], :verbose=>false}

(compared using ==)

Diff:
@@ -19,6 +19,7 @@
:show_legacy => true,
:timing => false,
:trace => false,
+:ttls => [\{"external_fact.txt"=>"30 days"}],
:user_query => [],
:verbose => false,

  1. ./spec/framework/core/options/option_store_spec.rb:16:in `block (3 levels) in <top (required)>'
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Bogdan Irimie (Jira)

unread,
Oct 7, 2020, 9:10:03 AM10/7/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Oct 7, 2020, 9:10:04 AM10/7/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ready for triage ghost-14.10

Florin Dragos (Jira)

unread,
Oct 12, 2020, 9:18:03 AM10/12/20
to puppe...@googlegroups.com

Bogdan Irimie (Jira)

unread,
Oct 14, 2020, 10:05:59 AM10/14/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-14.10 , ready for triage 2
Reply all
Reply to author
Forward
0 new messages