Closed
Description
Describe the Bug
It is not possible to set the ipaddress6
fact to any other value than FE80:0000:0000:0000:AAAA:AAAA:AAAA
.
Expected Behavior
The ipaddress6
fact should behave like other facts.
Steps to Reproduce
Create a class manifests/init.pp
:
class puppet_ipaddress6_test {
file { '/foo':
content => $facts['ipaddress6'],
}
}
And a spec test spec/classes/init_spec.rb
:
require 'puppetlabs_spec_helper/module_spec_helper'
describe 'puppet_ipaddress6_test', :type => :class do
let (:node) { 'server.example.org' }
let (:facts) do {
'ipaddress6' => '2001:db8::1',
} end
it {
is_expected.to contain_file('/foo').
with_content(/^2001:db8::1$/)
}
end
And a Rakefile
:
require 'puppetlabs_spec_helper/rake_tasks'
Then run the spec test:
rake spec
It will fail with the following error:
1) puppet_ipaddress6_test is expected to contain File[/foo] with content =~ /^2001:db8::1$/
Failure/Error:
is_expected.to contain_file('/foo').
with_content(/^2001:db8::1$/)
expected that the catalogue would contain File[/foo] with content set to /^2001:db8::1$/ but it is set to "FE80:0000:0000:0000:AAAA:AAAA:AAAA"
# ./spec/classes/init_spec.rb:9:in `block (2 levels) in <top (required)>'
Environment
- rspec-puppet version 2.10.0
- Gemfile
- Gemfile.lock
Additional Context
The hard-coded ipaddress6
fact was introduced in (#771) Set a default dummy ipaddress6 fact.
Metadata
Metadata
Assignees
Labels
No labels