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

Use facter 3 facts during tests #636

Merged
merged 1 commit into from
Sep 27, 2018

Conversation

alexjfisher
Copy link
Contributor

By default, rspec-puppet-facts uses the facterdb facts that match the
version of the facter gem installed. Starting with facter 3, facter
was no longer shipped as a gem (it was rewritten in C++).

This commit sets facterversion to 3.0.0 so that tests run with
more modern (structured) facts stubbed.

Puppet has been shipping facter 3 since puppet 4.2.0. This module
supports puppet >= 4.6.1, (and puppet 4 is EOL at the end of 2018).

puppet-extlib's ip_to_cron function (used in
puppet::agent::service::cron) has recently moved to using the
networking structured fact not available in facter 2.

@ekohl
Copy link
Member

ekohl commented Sep 27, 2018

By default, rspec-puppet-facts uses the facterdb facts that match the
version of the facter gem installed.  Starting with facter 3, facter
was no longer shipped as a gem (it was rewritten in C++).

This commit sets `facterversion` to `3.0.0` so that tests run with
more modern (structured) facts stubbed.

Puppet has been shipping facter 3 since puppet 4.2.0.  This module
supports puppet >= 4.6.1, (and puppet 4 is EOL at the end of 2018).

puppet-extlib's `ip_to_cron` function (used in
puppet::agent::service::cron) has recently moved to using the
`networking` structured fact not available in facter 2.
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idempotency test failure is unrelated and this fixes our spec tests. Thanks!

@ekohl ekohl merged commit 07b9c7c into theforeman:master Sep 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants