-
Notifications
You must be signed in to change notification settings - Fork 262
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 extra_template back #331
Conversation
@flyinprogrammer first of all, apologies for the regression and thank you for this awesome fix. This is ready to go, but I'd like to ask you for a favor.... Could you add a spec test for this? Just to ensure both the extra template and the apm footer are dropped in correctly (with and without an extra template being defined). Let me know if you don't have the bandwidth |
yeah let's see what i can get done with this tonight |
Gemfile
Outdated
@@ -18,4 +18,5 @@ group :development do | |||
gem "puppet-blacksmith" | |||
gem "nokogiri", "~> 1.6.0" | |||
gem "guard-rake" | |||
gem "xmlrpc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise I kept getting:
Could not autoload puppet/type/package: Could not autoload puppet/provider/package/pip: cannot load such file -- xmlrpc/client
when running the tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xmlrpc-0.3.0 requires ruby version >= 2.3, which is incompatible with the
current version, ruby 2.0.0p648
this is why i write golang now. hld plz.
@@ -593,6 +596,20 @@ | |||
'content' => /^sd_jmx_enable: true\n/, | |||
)} | |||
end | |||
context 'with extra_template enabled' do | |||
let(:params) { | |||
{:extra_template => 'custom_datadog/extra_template_test.erb', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I added this fixture correctly, I know we ignore this directory in .gitignore
, but it seemed like the correct thing to do? Please advise!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be the right thing to do.... it feels like it's the right location, but we'd want to have it outside of the .gitignore
blacklist.... that might not be possible though:
from the docs
It is not possible to re-include a file if a parent directory of that file is excluded
We'll have to come up with something I guess.... maybe an alternative location to fixtures 🤔
idk how you want to fix:
|
@flyinprogrammer looks like a problem with the current test matrix on Travis. Looking into it. Thanks a bunch for the tests 💯 |
Fixed the Travis issue, could you please rebase to the latest |
Gemfile
Outdated
@@ -18,4 +18,5 @@ group :development do | |||
gem "puppet-blacksmith" | |||
gem "nokogiri", "~> 1.6.0" | |||
gem "guard-rake" | |||
gem "xmlrpc" if RUBY_VERSION >= '2.3' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you elaborate a bit on this (for posterity)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
locally I'm running the tests against ruby 2.4.1p111
and in order to get the tests to pass you need to install this gem. of course when your ruby is < 2.3
the builds will barf apparently.
here are my ramblings from previous builds that failed: https://github.com/DataDog/puppet-datadog-agent/pull/331/files/bfe9b22bbbc2527c8a18f57519a26f6793e36e4e#r128139904
OK - so this is how I addressed the issue:
I copied And I then fixed up Let me know if you don't like this approach. :) |
I think this is great and I think you're great @truthbk !! Thanks for teaching me how to do the fixtures, and I'm sorry for kinda being lazy and not digging into the docs more. I rebased off master and squashed my commits. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me! Thanks so much for taking the time to add and fix the tests - it's awesome to have these things tested out. 🙇
Fix regression in #261
where an
extra_template
was no longer getting concat'd to the template file.