-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Moving away from templates to usign inifile from Puppetlabs/inifile #7
Conversation
@@ -1,7 +1,7 @@ | |||
# == Class icingaweb2::config | |||
# | |||
class icingaweb2::config { | |||
assert_private() |
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.
Please update your stdlib and revert this line. ;)
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.
The update to move to assert_private is extremely new and not included in even the newest release 4.5.1 (https://github.com/puppetlabs/puppetlabs-stdlib/tree/4.5.1). You would be required to run off the latest release or specific commit you listed above. This might limit users from being able to utilize this module, would you be ok with having it set with private() for now and updating once a new version of stdlib is cut ?
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.
You can also use is_function_available('assert_private')
to support both.
It's in stdlib as well.
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.
I updated to support both as requested
Thanks for the contribution. |
I unfortunately don't have any experience with writing spec tests, though my changes didn't introduce any new parameters or logic that shouldn't ( from what I gather looking at the current tests ) break or invalidate the current spec tests. Is there something specific that you would request be added ? |
Is there any comments you can provide or changes you think need made? |
Unbreaking the tests would be an excellent start to get it merged. :)
|
Well that definitely doesn't look good :), I'll try to do some reading up on rspec this week so I can debug what is making the tests fail. I'm able to manually test this with puppet apply on a host and it works, my changes must have introduced something that is making the tests freak out |
Judging by the looks of your code I'm quite confident it works flawlessly. 👍 |
Any help would be appreciated, no rush as IcingaWeb2 is still in beta and we are not actively using this module in any production environment. I was just doing some testing and wanted to give back my changes. |
@smbambling You first have to add a dependency on the puppetlabs-inifile module in the diff --git a/.fixtures.yml b/.fixtures.yml
index a0ee02e..5e61be1 100644
--- a/.fixtures.yml
+++ b/.fixtures.yml
@@ -2,6 +2,7 @@ fixtures:
repositories:
apache: 'git://github.com/puppetlabs/puppetlabs-apache.git'
concat: 'git://github.com/puppetlabs/puppetlabs-concat.git'
+ inifile: 'git://github.com/puppetlabs/puppetlabs-inifile.git'
stdlib: 'git://github.com/puppetlabs/puppetlabs-stdlib.git'
vcsrepo: 'git://github.com/puppetlabs/puppetlabs-vcsrepo.git' Then they start showing a useful error:
I don't see any |
I found some typos with the resource defines and them being called in config.pp. I also added the update to the .fixtures.yml file you stated. Now I can see some some detailed errors.
|
Looks good so far. 👍 |
Fixing those failing tests right now. :) |
Merged upstream! |
awesome thanks @arioch |
This give extra flexibility when adding multiple resources or authentication types. You can just call the define in your profile manifest.