zuazo / dovecot-cookbook

Chef cookbook to install and configure Dovecot.
https://supermarket.chef.io/cookbooks/dovecot
Apache License 2.0
26 stars 33 forks source link

Finalize pwfilesupport #25

Closed varet80 closed 7 years ago

varet80 commented 7 years ago
New Feature: Create a Passwd file using Databags

- Generate UserDB
 - Source from databags
 - Compare users with the current if exist

- Kitchen
 - Change Exceptions for centos 7.2 (fall into some bugs)
 - Add databags support
 - Add databags with two users

- User Recipe
 - Change priority on dovecot user creation (group goes after user)

- New AttribugesAttributes
 - Databag name attribute is  `databag_name`
 - Databag item for userdb `databag_users_item`
varet80 commented 7 years ago

@zuazo I might need your help with the unit tests & Integration tests, though the system generates properly the file on integration tests.

Also I want to see an alternative (next version) of using custom resource for the password file.

zuazo commented 7 years ago

OK, Thanks @billiaz!! Give me a couple of days to review this.

Regarding the tests, I think the simplest thing would be to do some integration tests in the testing cookbook, maybe create a new recipe there, and adding some Serverspec resources to check the generated file under test/integration. The steps:

Tell me if you run into any errors/problems. If you can not complete them, send me what you have and I already try to do it myself.

Another alternative would be to add ChefSpec tests, but I think in this specific case that could be trickier due to the ruby block.

varet80 commented 7 years ago

Hey! thanks for the support

  1. I have already done the new recipe
  2. databags too
  3. I need to add the recipe on a new suite
  4. test the new suite
  5. Move the block under custom resource or create library for it... thinking about it(too big for ruby block) redoo 2-4
coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 98.645% when pulling 469a453ad06eff1cba5e7546b5735ed6cecd7d5f on schubergphilis:finalize_pwfilesupport into a57e3070348c984ba483e3c1589033cd9e7629b3 on zuazo:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 98.645% when pulling 469a453ad06eff1cba5e7546b5735ed6cecd7d5f on schubergphilis:finalize_pwfilesupport into a57e3070348c984ba483e3c1589033cd9e7629b3 on zuazo:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.03%) to 98.645% when pulling 469a453ad06eff1cba5e7546b5735ed6cecd7d5f on schubergphilis:finalize_pwfilesupport into a57e3070348c984ba483e3c1589033cd9e7629b3 on zuazo:master.

varet80 commented 7 years ago

Thanks for the help! it is my first real contribution.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-5.6%) to 92.966% when pulling 39d13f8806cf4456c631c158e3a7b821608e0af5 on schubergphilis:finalize_pwfilesupport into a57e3070348c984ba483e3c1589033cd9e7629b3 on zuazo:master.

varet80 commented 7 years ago

Is there something more I should do to make this pull request ready for merge?

zuazo commented 7 years ago

Thanks @billiaz. No, it is ready to be merged. Give me a couple of days because I want to test some of the functions by hand. I'm planning to release this during weekend if you can wait a little.

zuazo commented 7 years ago

OK. I have merged this PR after:

You can see the changes in 667058b1ccb2f52ac432cca61bbaadb58800e6a6.

zuazo commented 7 years ago

Released in 3.2.0.

Thanks for your patience.