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

Support for dns_alt_names #95

Open
wants to merge 1 commit into
base: production
Choose a base branch
from

Conversation

divansantana
Copy link
Contributor

Support for dns_alt_names configuration in puppet master.

Fixes #23

Support for dns_alt_names configuration in puppet master.

Fixes abstractitptyltd#23
@divansantana
Copy link
Contributor Author

Think the issue here is my spec tests are wrong. I'll correct it tomorrow.

@rendhalver
Copy link
Member

Errors are here:
https://travis-ci.org/abstractitptyltd/abstractit-puppet/jobs/132841534#L1192-L1209
They aren't that informative but they do contain line numbers.
Let me know if you can't work out what is going wrong.

If you get the tests working I don't see any issued withe merging this,

@divansantana
Copy link
Contributor Author

@rendhalver I'm actually pretty clueless with these tests. Haven't yet done any tests before or have it all setup on my system so I can actually use them. Though do need to/want to get it going.

So if you can spot what's going on, that's great, otherwise I'll eventually get to this.

I know the code is working though.

@rendhalver
Copy link
Member

rendhalver commented Jun 3, 2016

I have everything you need to test things setup in the Rakefile and Gemfile.
bundle install will get you started.
bundle exec rake test will run the tests locally. :)
note to self I should really add the CONTRIBUTING.md file

@divansantana
Copy link
Contributor Author

@rendhalver Cool, so the above helped and I can now run tests and try a few different things, but still can't figure out this test case scenario and make it work.

I think it's because I change the dns_alt_names from an array to a string in the manifests that the test is not passing. Though not quite sure. Any ideas?

@rendhalver
Copy link
Member

It may be that this join $_dns_alt_names = join($dns_alt_names, ',') is adding a space between the values.
What does it produce in the config files on an agent?

You should also add a test for when the setting is absent.

@divansantana
Copy link
Contributor Author

It may be that this join $_dns_alt_names = join($dns_alt_names, ',') is adding a space between the values.
What does it produce in the config files on an agent?

So this yaml

puppet::profile::master::dns_alt_names:
  - puppet.example.co.za
  - test.example.co.za

Seems to produce this, without spaces.

# grep dns /etc/puppet/puppet.conf
dns_alt_names = puppet.example.co.za,test.example.co.za
# 

Which is correct.

I'll look at adding the test for the absent, thanks.

@rendhalver
Copy link
Member

Please rebase @divansantana.
I am still not sure what's up with the spec test failures but The code has changed a lot since you opened this.

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