Add test for apm footer to not apply template if = empty string#381
Merged
truthbk merged 2 commits intoDataDog:masterfrom Feb 5, 2018
Merged
Add test for apm footer to not apply template if = empty string#381truthbk merged 2 commits intoDataDog:masterfrom
truthbk merged 2 commits intoDataDog:masterfrom
Conversation
truthbk
reviewed
Jan 31, 2018
| target => '/etc/dd-agent/datadog.conf', | ||
| content => template('datadog_agent/datadog_apm_footer.conf.erb'), | ||
| order => $apm_footer_order, | ||
| if $apm_env != '' { |
Member
There was a problem hiding this comment.
would it maybe make more sense to check for $apm_enabled?
Contributor
Author
There was a problem hiding this comment.
That makes sense but if apm_enabled == true but apm_env is not set then you would still get an error.
I could add a check for both so long as we think the user will know they need to set both variables to have it configured.
truthbk
approved these changes
Feb 5, 2018
Member
truthbk
left a comment
There was a problem hiding this comment.
This looks good to me 👍
Tests break as a consequence of these changes but since I'm working on a few things currently I'll make sure we get them fixed ASAP.
Thank you! 🙇
cegeka-jenkins
pushed a commit
to cegeka/puppet-datadog_agent
that referenced
this pull request
Apr 6, 2020
Add test for apm footer to not apply template if = empty string
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This causes an error on nodes that don't have an apm footer set. The default value is an empty string and tests between puppet 3 and puppet 4 are different.
Explicitly testing for an empty string to know if we should create the template.