Jira (FACT-2707) Facter 4 unit test not fully isolated

8 views
Skip to first unread message

Mihai Buzgau (Jira)

unread,
Jul 9, 2020, 8:30:03 AM7/9/20
to puppe...@googlegroups.com
Mihai Buzgau created an issue
 
Facter / Task FACT-2707
Facter 4 unit test not fully isolated
Issue Type: Task Task
Assignee: Unassigned
Created: 2020/07/09 5:29 AM
Priority: Normal Normal
Reporter: Mihai Buzgau

It seems like the facter 4 hyper-v unit test gets the information from the OS instead of a mocked value:

Failures:
 
  1) Facts::Linux::Virtual#call_the_resolver when is hyper-v discovered with lspci returns virtual fact
     Failure/Error:
       expect(fact.call_the_resolver).to be_an_instance_of(Facter::ResolvedFact).and \
         have_attributes(name: 'virtual', value: value)
 
       expected #<Facter::ResolvedFact:0x000055b2f3048728 @name="virtual", @value="vmware", @type=:core, @user_query=nil, @filter_tokens=[]> to have attributes {:name => "virtual", :value => "hyperv"} but had attributes {:name => "virtual", :value => "vmware"}
       Diff for (have attributes {:name => "virtual", :value => "hyperv"}):
       @@ -1,3 +1,7 @@
       -:name => "virtual",
       -:value => "hyperv",
       +#<Facter::ResolvedFact:0x000055b2f3048728
       + @filter_tokens=[],
       + @name="virtual",
       + @type=:core,
       + @user_query=nil,
       + @value="vmware">
 
     # ./spec/facter/facts/linux/virtual_spec.rb:134:in `block (4 levels) in <top (required)>'
 
Finished in 2.04 seconds (files took 1.11 seconds to load)
2431 examples, 1 failure
 
Failed examples:
 
rspec ./spec/facter/facts/linux/virtual_spec.rb:133 # Facts::Linux::Virtual#call_the_resolver when is hyper-v discovered with lspci returns virtual fact

Steps to reproduce:

  • Start a vmpooler VM (tested on Ubuntu 18.04)
  • Clone facter, 4.x branch
  • Run ./check.sh
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Mihai Buzgau (Jira)

unread,
Jul 15, 2020, 9:00:03 AM7/15/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Story Points: 2

Mihai Buzgau (Jira)

unread,
Jul 15, 2020, 9:00:04 AM7/15/20
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
Change By: Mihai Buzgau
Sprint: ready for triage ghost-22.07

Oana Tanasoiu (Jira)

unread,
Jul 21, 2020, 11:27:02 AM7/21/20
to puppe...@googlegroups.com
Oana Tanasoiu assigned an issue to Oana Tanasoiu
Change By: Oana Tanasoiu
Assignee: Oana Tanasoiu

Bogdan Irimie (Jira)

unread,
Jul 22, 2020, 9:06:10 AM7/22/20
to puppe...@googlegroups.com
Bogdan Irimie updated an issue
Change By: Bogdan Irimie
Sprint: ghost-22.07 , ready for triage 2
Reply all
Reply to author
Forward
0 new messages