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

Why force puppetversion fact everywhere in the archive spec? #120

Closed
aerostitch opened this issue Feb 18, 2016 · 1 comment
Closed

Why force puppetversion fact everywhere in the archive spec? #120

aerostitch opened this issue Feb 18, 2016 · 1 comment

Comments

@aerostitch
Copy link
Contributor

Hi,

I was wondering why you force the puppetversion fact in spec/classes/archive_spec.rb even for the opensource version of puppet.

It looks a bit weird to test against different versions but to force the version fact in the tests no?

:puppetversion => '3.7.3'

I discovered that because when writing a module that depends on puppet-archive and wrote rspec tests without forcing this fact. In this case, the tests fail with the following error:

error during compilation: Undefined variable "::puppetversion"; Undefined variable "puppetversion" at /home/travis/build/tubemogul/puppet-aerospike/spec/fixtures/modules/archive/manifests/params.pp:22 on node testing-worker-linux-docker-212279d8-3372-linux-8.prod.travis-ci.org

Thanks for your help,
Joseph

@aerostitch
Copy link
Contributor Author

Answer to myself: It's because rspec-puppet says:

By default, the test environment contains no facts for your manifest to use.

I'll provide a few tests to cover the few more cases we have in params.pp in #117 and it should be fine.
Closing this one as RTFM! ;)

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