Skip to content

Commit 2ebd257

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 06c0c88 commit 2ebd257

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
@@ -48,8 +48,6 @@ Gemfile:
4848
unmanaged: false
4949
.github/workflows/release_prep.yml:
5050
unmanaged: false
51-
spec/default_facts.yml:
52-
delete: true
5351
spec/spec_helper.rb:
5452
unmanaged: true
5553
# 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)