Skip to content

Commit 3a56a9c

Browse files
committed
(CONT-801) Addressing unit failures
1 parent b762e41 commit 3a56a9c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/puppet/parser/functions/fqdn_rotate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
elements = result.size
4040

41-
seed = Digest::MD5.hexdigest([lookupvar('::fqdn'), args].join(':')).hex
41+
seed = Digest::MD5.hexdigest([lookupvar('facts'), args].join(':')).hex
4242
# deterministic_rand() was added in Puppet 3.2.0; reimplement if necessary
4343
if Puppet::Util.respond_to?(:deterministic_rand)
4444
offset = Puppet::Util.deterministic_rand(seed, elements).to_i

spec/functions/fqdn_rotate_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ def fqdn_rotate(value, args = {})
6868

6969
# workaround not being able to use let(:facts) because some tests need
7070
# multiple different hostnames in one context
71-
allow(scope).to receive(:lookupvar).with('::fqdn').and_return(host)
71+
allow(scope).to receive(:lookupvar).with('facts').and_return(host)
7272

7373
function_args = [value] + extra
7474
scope.function_fqdn_rotate(function_args)

0 commit comments

Comments
 (0)