Skip to content

(FACT-2724) Confine blocks behave differently with Facter 4, causing spec tests to suddenly fail#2010

Merged
Filipovici-Andrei merged 1 commit intopuppetlabs:4.xfrom
BogdanIrimie:FACT-2724
Aug 4, 2020
Merged

(FACT-2724) Confine blocks behave differently with Facter 4, causing spec tests to suddenly fail#2010
Filipovici-Andrei merged 1 commit intopuppetlabs:4.xfrom
BogdanIrimie:FACT-2724

Conversation

@BogdanIrimie
Copy link
Copy Markdown
Contributor

problem

virtual fact was returning nil on physical macOS hosts. The test mocked virtual fact by using

allow(Facter.fact(:virtual)).to receive(:value).and_return('physical')

and because Facter.fact(:virtual) returned nil on physical macOS hosts, the mock was basically

allow(nil).to receive(:value).and_return('physical')

fix

on macOS physiscal host, facter will return virtual => physical

@BogdanIrimie BogdanIrimie requested review from a team August 3, 2020 13:52
@puppetcla
Copy link
Copy Markdown

CLA signed by all contributors.

@BogdanIrimie BogdanIrimie added the bug Something isn't working label Aug 4, 2020
@Filipovici-Andrei Filipovici-Andrei merged commit e6d94c7 into puppetlabs:4.x Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants