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

Make postfixadmin installation optional #9

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

arunderwood
Copy link

@arunderwood arunderwood commented Mar 12, 2017

Description

This change makes the installation of postfixadmin optional by setting the attribute node['postfix-dovecot']['postfixadmin']['enabled'] to false.

As-is, my change does not include any additional test coverage. I don't have much experience in this area, but if coverage is required and you could point me to where I should include the test, I can take a swing at it.

Issues Resolved

/issues/8

Contribution Check List

  • All tests pass.
  • New functionality includes testing.
  • New functionality has been documented in the README and metadata if applicable.

See CONTRIBUTING.md.

@zuazo
Copy link
Owner

zuazo commented Mar 12, 2017

@arunderwood thanks for the PR! 😄

In this case, you can easily create some ChefSpec tests to check that postfixadmin cookbook is not included in the ::postfixadmin recipe.

Something in test/unit/recipes/postfixadmin_spec.rb similar to the following:

  describe 'with postfixadmin disabled' do
    before { node.set['postfix-dovecot']['postfixadmin']['enabled'] = false }

    it 'does not include postfixadmin recipe' do
       # [....]
    end
  end

If I understand your PR correctly, I think we can have two options here:

  1. Create the MySQL/PostgreSQL tables in a new recipe and include the correct map_files.
  2. Leave the database creation in the hands of the user. In this second case, we need to make it clear in the readme that this is user work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants