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

Add 'name' parameter to the 'resource_hash' for validate_references #200

Merged

Conversation

xakraz
Copy link
Contributor

@xakraz xakraz commented Nov 20, 2018

Overview

This pull request changes the Catalog validation functionality.

The Apache httpd server is well known to be THE software that has different names between RHEL based OS (httpd) and Debian + others ones (apache2).

For this kind of issue, Puppet allows you to add an alias parameter on any resource and this works fine in octocatalog-diff.

The Apache module we use (puppetlabs-apache, "version": "2.3.0") defines the name parameter and not the alias. Then the catalog validation fails in our case (puppetlabs-apache + voxpupuli/puppet-puppetboard:4.0.0)

To work around this limitation, I added the name parameter to the resources_hash object if it exists.

Checklist

  • Make sure that all of the tests pass, and fix any that don't. Just run rake in your checkout directory, or review the CI job triggered whenever you push to a pull request.
  • Make sure that there is 100% test coverage by running rake coverage:spec or ignoring untestable sections of code with # :nocov comments. If you need help getting to 100% coverage please ask; however, don't just submit code with no tests.

/cc [related issues] [teams and individuals, making sure to mention why you're CC-ing them]

@xakraz
Copy link
Contributor Author

xakraz commented Nov 20, 2018

I tried to run the tests into a docker container but I have managed to make them pass ...

However, I have the same number of failures and pending in both kind of tests required by the PR templates on master and on my branch ...

If somebody could guide me to, that would be very nice :)

@kpaulisse kpaulisse mentioned this pull request Dec 7, 2018
@kpaulisse kpaulisse merged commit 962a374 into github:master Dec 9, 2018
Copy link
Contributor

@kpaulisse kpaulisse left a comment

Choose a reason for hiding this comment

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

Thank you for submitting this PR. I apologize that it took so long for me to review and merge it. This enhancement will go in to release 1.5.4 when it comes out later this week. Many thanks for your contribution!

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

Successfully merging this pull request may close these issues.

None yet

2 participants