-
-
Notifications
You must be signed in to change notification settings - Fork 133
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
Fix readonly database property #422
base: master
Are you sure you want to change the base?
Conversation
Squashed and rebased as requested @smortex. Not convinced the spec tests work correctly though. |
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.
Not convinced the spec tests work correctly though.
Tests are run by GitHub and show what is found vs what was expected. CI failed at an earlier stage but fixing the issue above bellow should allow it to continue. In any case, if you want to run these tests on your machine you can:
bundle exec rake spec_prep
bundle exec rspec spec/unit/puppet/provider/openldap_database/olc_spec.rb
@@ -167,6 +167,8 @@ def should_to_s(_newvalue) | |||
|
|||
newproperty(:readonly) do | |||
desc 'Puts the database into read-only mode.' | |||
newvalues(:true, :false) | |||
defaultto(:false) |
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 guess the new default value is the reason for the CI failue:
REFERENCE.md is outdated
Please update REFERENCE.md with
$ bundle exec rake strings:generate:reference
Add it to the PR and CI should continue.
The database `readonly` property expects a boolean, but the olc provider doesn't take care to parse the existing value into a boolean, thus leading to issues. Simply applies the same logic applied to `olcMirrorMode` for `olcReadOnly`.
This is failing on the tests. I'm not 100% sure exactly what the original author intended, and I don't have enough knowledge of RSpec to fix it I'm afraid. |
The database
readonly
property expects a boolean, but the olc provider doesn't take care to parse the existing value into a boolean, thus leading to issues.Simply applies the same logic applied to
olcMirrorMode
forolcReadOnly
.Fixes #207
Fixes #358