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

pdk validate fails if host puppet.conf contains deprecated settings #304

Closed
jdowling opened this issue Sep 29, 2017 · 2 comments
Closed
Labels

Comments

@jdowling
Copy link

Causes jenkins jobs to go unstable as this is logged as test failures when published as junit test results.

This should not happen as the contents of the module under test shouldn't have anything to do with the host configuration. It would make more sense for pdk to contain a stub puppet.conf & override reference to that when puppet is invoked.

Repro scenario:
host happens to be managed by an older version of puppet.
The system puppet.conf on the host contains 'configtimeout'
command to run: pdk validate --format=junit:validate.xml && exit %ERRORLEVEL%

output:

...
<testsuite name="puppet-syntax" tests="3" errors="0" failures="2" skipped="0" time="0" timestamp="2017-09-29T15:49:37" hostname="hosty" id="2" package="puppet-syntax">
<properties/>
<testcase classname="puppet-syntax" name="manifests/init.pp" time="0"/>
<testcase classname="puppet-syntax" name="" time="0">
<failure type="Warning" message="Setting configtimeout is deprecated.">
Warning: puppet-syntax: Setting configtimeout is deprecated.
</failure>
</testcase>
<testcase classname="puppet-syntax" name="" time="0">
<failure type="" message="(at C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.2.0-x64-mingw32/lib/puppet/settings.rb:1159:in `issue_deprecation_warning')">
: puppet-syntax: (at C:/Program Files/Puppet Labs/DevelopmentKit/share/cache/ruby/2.1.0/gems/puppet-5.2.0-x64-mingw32/lib/puppet/settings.rb:1159:in `issue_deprecation_warning')
</failure>
</testcase>
<system-out/>
<system-err/>
</testsuite>
...
@DavidS DavidS added the bug label Oct 5, 2017
@DavidS
Copy link
Contributor

DavidS commented Oct 5, 2017

I could reproduce this locally, and have created https://tickets.puppetlabs.com/browse/PDK-575 for tracking this internally.

While I consider this a bug, I would also recommend against running testing and validation on a privileged account, to avoid unfortunate "accidents" with misbehaving tests.

@scotje
Copy link
Contributor

scotje commented Mar 21, 2018

This issue should now be resolved as of PDK 1.4.1, please let us know if you are still having difficulties after upgrading. Thanks for the bug report!

@scotje scotje closed this as completed Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants