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 data_dir, manage_{user,group} as optional parameters in init.pp #25

Merged
merged 2 commits into from
Aug 28, 2015

Conversation

nhandler
Copy link
Contributor

consul_template::install requires some variables to work properly. However, the class takes no parameters. By adding them as optional parameters in init.pp, they can be passed in directly or via Hiera.

Currently, there are no tests for this class. A simple 'it { is_expected.to compile }' will unearth the problem. The trickier part of writing a test is that the class operates under the assumption that consul_template will be executed first, and that consul_template will include consul_template::install. This makes it difficult to write a spec that directly tests consul_template::install.

install.pp expects a $consul_template::data_dir variable to exist. We will satisfy this expectation by adding it as a parameter in init.pp with a default value of ''.
install.pp is complaining about some additional unknown variables. This commit declares them in init.pp
@gdhbashton
Copy link
Contributor

Ooh lovely - if you're going to submit a PR full of tests then you're my favourite person :)

gdhbashton added a commit that referenced this pull request Aug 28, 2015
Add data_dir, manage_{user,group} as optional parameters in init.pp
@gdhbashton gdhbashton merged commit 7e2479f into claranet:master Aug 28, 2015
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.

2 participants