Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rspec-Puppet tests fails with undefined variable for all custom facts used, when using STRICT_VARIABLES #98

Open
cardil opened this issue Jun 26, 2018 · 0 comments

Comments

@cardil
Copy link
Collaborator

cardil commented Jun 26, 2018

Tests in rspec-puppet fails with message similar to:

Undefined variable "::augeasversion"; Undefined variable "augeasversion" at /code/puppet/jboss/spec/fixtures/modules/jboss/manifests/internal/augeas.pp:4

Those issues can be fixed by setting those facts in test like this:

on_supported_os do |os, facts|
  let(:facts) { facts.merge(:jboss_running => false) }
end

See example error here: https://travis-ci.org/coi-gov-pl/puppet-jboss/jobs/396957209#L3291-L3295

cardil pushed a commit that referenced this issue Jun 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant