From f053d67e62ad59f03a0f716ecd1a040afc8210ca Mon Sep 17 00:00:00 2001 From: Steven Pritchard Date: Wed, 29 Nov 2023 13:51:43 -0600 Subject: [PATCH] Changes to demonstrate https://github.com/puppetlabs/pdk-templates/issues/543 --- Gemfile | 1 + metadata.json | 4 ++-- spec/classes/issue_543_spec.rb | 7 +++++++ spec/default_facts.yml | 7 ++++--- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index add1873..a5081ff 100644 --- a/Gemfile +++ b/Gemfile @@ -34,6 +34,7 @@ group :development do gem "rubocop", '= 1.48.1', require: false gem "rubocop-performance", '= 1.16.0', require: false gem "rubocop-rspec", '= 2.19.0', require: false + gem "puppet-strings", '~> 4.0', require: false gem "rb-readline", '= 0.5.5', require: false, platforms: [:mswin, :mingw, :x64_mingw] end group :system_tests do diff --git a/metadata.json b/metadata.json index 8967636..1ff10df 100644 --- a/metadata.json +++ b/metadata.json @@ -41,6 +41,6 @@ } ], "pdk-version": "3.0.0", - "template-url": "pdk-default#3.0.0", - "template-ref": "tags/3.0.0-0-g056e50d" + "template-url": "https://github.com/puppetlabs/pdk-templates#3.0.0", + "template-ref": "tags/3.0.0-0-g5bfc1c0" } diff --git a/spec/classes/issue_543_spec.rb b/spec/classes/issue_543_spec.rb index d351f2e..b88b4fc 100644 --- a/spec/classes/issue_543_spec.rb +++ b/spec/classes/issue_543_spec.rb @@ -5,6 +5,13 @@ describe 'issue_543' do on_supported_os.each do |os, os_facts| context "on #{os}" do + let(:pre_condition) do + <<~END + if $facts['networking']['fqdn'].empty { + fail("No fqdn fact: networking => ${facts['networking']}") + } + END + end let(:facts) { os_facts } it { is_expected.to compile.with_all_deps } diff --git a/spec/default_facts.yml b/spec/default_facts.yml index f777abf..3346c39 100644 --- a/spec/default_facts.yml +++ b/spec/default_facts.yml @@ -2,7 +2,8 @@ # # Facts specified here will override the values provided by rspec-puppet-facts. --- -ipaddress: "172.16.254.254" -ipaddress6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" +networking: + ip: "172.16.254.254" + ip6: "FE80:0000:0000:0000:AAAA:AAAA:AAAA" + mac: "AA:AA:AA:AA:AA:AA" is_pe: false -macaddress: "AA:AA:AA:AA:AA:AA"