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-511) Add strict checking for PDK unit test templates #36

Merged
merged 3 commits into from
Mar 20, 2018
Merged

(PDK-511) Add strict checking for PDK unit test templates #36

merged 3 commits into from
Mar 20, 2018

Conversation

da-ar
Copy link

@da-ar da-ar commented Mar 12, 2018

Background: resource-api will check get values to see if they have been modified by canonicalize and will throw if Puppet strict is at :error level.

This change ensures that tests are run at the highest level by default.

@da-ar da-ar requested review from DavidS, rodjek and bmjen March 12, 2018 11:45
Copy link
Contributor

@DavidS DavidS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amended with a bit of docs and a minor fixup.

@rodjek
Copy link
Contributor

rodjek commented Mar 12, 2018

Will this create/expose errors in manifest tests that previously would have gone unnoticed? If so, it's probably best to wait on merging this until we get closer to 1.5.0.

@DavidS
Copy link
Contributor

DavidS commented Mar 13, 2018

I ran pdk test unit --parallel with and without :error over all supported modules. all modules marked with a + in the list below are net-new failures when enabling that:

david@davids:~/git/modulesync_configs/modules$ diff -u failed.clean failed
--- failed.clean	2018-03-13 09:55:01.370863816 +0000
+++ failed	2018-03-13 08:53:19.746532309 +0000
@@ -1,7 +1,15 @@
 /home/david/git/modulesync_configs/modules/puppetlabs-apache
+/home/david/git/modulesync_configs/modules/puppetlabs-chocolatey
 /home/david/git/modulesync_configs/modules/puppetlabs-dsc
+/home/david/git/modulesync_configs/modules/puppetlabs-haproxy
+/home/david/git/modulesync_configs/modules/puppetlabs-ibm_installation_manager
 /home/david/git/modulesync_configs/modules/puppetlabs-ntp
 /home/david/git/modulesync_configs/modules/puppetlabs-powershell
 /home/david/git/modulesync_configs/modules/puppetlabs-puppet_agent
+/home/david/git/modulesync_configs/modules/puppetlabs-sqlserver
+/home/david/git/modulesync_configs/modules/puppetlabs-stdlib
+/home/david/git/modulesync_configs/modules/puppetlabs-tftp
 /home/david/git/modulesync_configs/modules/puppetlabs-vcsrepo
+/home/david/git/modulesync_configs/modules/puppetlabs-websphere_application_server
+/home/david/git/modulesync_configs/modules/puppetlabs-wsus_client
 /home/david/git/modulesync_configs/modules/yang_ietf
david@davids:~/git/modulesync_configs/modules$ 

We might want to change the default to :warning, which is puppet's default. That way the resource api can recommend turning it up, using the unmodified template, without impacting existing modules.

@bmjen
Copy link
Contributor

bmjen commented Mar 13, 2018

+1 to defaulting to the default, and allowing customization to strict.

@da-ar
Copy link
Author

da-ar commented Mar 13, 2018

Updated to use ":warning" as the default value. Additional description added to readme encouraging the stricter use of ":error"

@DavidS DavidS merged commit 845a5a9 into puppetlabs:master Mar 20, 2018
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.

4 participants