Skip to content

Commit 75c8f8e

Browse files
committed
(PA-7897) Stub server fact values
Previously, rspec tests emitted a "Could not retrieve fact networking.ip". This warning occurs because puppet's compiler adds "server facts" and rspec-puppet replicates this behavior in server_facts_hash[1]. However, none of the test infrastructure provided stubbed values. We used to provide legacy facts for this, like "ipaddress", but they were deleted in commit e22ccfe as part of the move to pdk templates 2.5 This commits adds default_facts.yml back using pdk update --template-ref=3.6.1.1
1 parent 5a63923 commit 75c8f8e

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

.sync.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ Gemfile:
5050
unmanaged: false
5151
.github/workflows/release_prep.yml:
5252
unmanaged: false
53-
spec/default_facts.yml:
54-
delete: true
5553
spec/spec_helper.rb:
5654
unmanaged: true
5755
# puppet_url_without modules check in puppet-lint assumes any puppet:/// URL is

spec/default_facts.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Use default_module_facts.yml for module specific facts.
2+
#
3+
# Facts specified here will override the values provided by rspec-puppet-facts.
4+
---
5+
networking:
6+
ip: "172.16.254.254"
7+
ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
8+
mac: "AA:AA:AA:AA:AA:AA"
9+
is_pe: false

0 commit comments

Comments
 (0)