From 217add80f1f36ff166a00b5a9b82938f234e6717 Mon Sep 17 00:00:00 2001 From: Aria Li Date: Tue, 7 Feb 2023 12:59:18 -0800 Subject: [PATCH] (PUP-11752) fqdn_rand_string_spec.rb relies on legacy fqdn fact There could potentially be other modules that are impacted too --- spec/functions/fqdn_rand_string_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/functions/fqdn_rand_string_spec.rb b/spec/functions/fqdn_rand_string_spec.rb index 1102b87f8..027b59320 100644 --- a/spec/functions/fqdn_rand_string_spec.rb +++ b/spec/functions/fqdn_rand_string_spec.rb @@ -57,7 +57,7 @@ def fqdn_rand_string(max, args = {}) # workaround not being able to use let(:facts) because some tests need # multiple different hostnames in one context - allow(scope).to receive(:lookupvar).with('::fqdn', {}).and_return(host) + allow(scope).to receive(:lookupvar).with('facts', {}).and_return({ 'networking' => { 'fqdn' => host } }) function_args = [max] if args.key?(:charset) || !extra.empty?