-
-
Notifications
You must be signed in to change notification settings - Fork 108
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
chore(unit-tests) generate test fixtures from Puppetfile #2263
Merged
dduportal
merged 10 commits into
jenkins-infra:production
from
dduportal:chore/puppetfile-to-test-fixtures
Jul 11, 2022
Merged
chore(unit-tests) generate test fixtures from Puppetfile #2263
dduportal
merged 10 commits into
jenkins-infra:production
from
dduportal:chore/puppetfile-to-test-fixtures
Jul 11, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dduportal
force-pushed
the
chore/puppetfile-to-test-fixtures
branch
from
July 8, 2022 11:31
728cd0b
to
f59529a
Compare
dduportal
force-pushed
the
chore/puppetfile-to-test-fixtures
branch
3 times, most recently
from
July 10, 2022 10:00
122ae9f
to
5183bef
Compare
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
Signed-off-by: Damien Duportal <damien.duportal@gmail.com>
dduportal
force-pushed
the
chore/puppetfile-to-test-fixtures
branch
from
July 10, 2022 10:21
4feb42b
to
4f6133d
Compare
lemeurherve
reviewed
Jul 11, 2022
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
lemeurherve
previously approved these changes
Jul 11, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job! 🎉
Co-authored-by: Hervé Le Meur <91831478+lemeurherve@users.noreply.github.com>
smerle33
approved these changes
Jul 11, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds great
🚀
lemeurherve
approved these changes
Jul 11, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a big cleanup on the Puppet unit test to ensure that we can keep it working and upgrade dependencies in the future. Had to untangle quite some elements but it's hard to split into small PRs, so here we go.
EDIT: please only take teh "ci.jenkins.io" check, not the infra.ci.jenkins.io one.
It introduces the following changes:
Remove the file
.fixtures.yml
from the repository:Puppetfile
and required manual copy and paste, leading to unit test running with different puppet modules than productiongenerate-puppetfile
new ruby gem which readsPuppetfile
and generatesFix the Puppet code to support both Puppet v4 (version used for unit tests) and v6 (production server), using Puppet formatter for most of them:
include
directive does not need the::
prefix anymore when loading a top-level moduleensure
saysfile
instead ofpresent
for resources of typefile
ensure
is deprecated forconcat::fragment
resourceFix Unit Tests Harness with the errors raised by the having an up-to-date
.fixtures.yml
file:facter
's mock facts to support both Puppet v4 and v6 inspec/spec_helper.rb
apache::mod::status
module as it's not available in this mocked context with recent versions (should be an acceptance test)census
tests that were checking a deprecated attrbitue for the resourceconcat::fragment
Update the Pipeline (
Jenkinsfile
):Rakefile
to make sure that both pipeline and local development can behave the same.fixtures.yml
file generated during the build for auditing purposeDocumentation: README updated (was long due)
Please note that with this PR, we can start thinking about:
Gemfile
to recent (and decent) versions including Puppet v4 to v6Puppetfile