summaryrefslogtreecommitdiffstats
path: root/puppet/t/20-puppet-tests.t
Commit message (Collapse)AuthorAgeFilesLines
* Change copyrights from Nokia to DigiaSergio Ahumada2012-09-271-24/+26
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I663e6fde9d2df2814463be90018014e599322efc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* tests: on failure due to warnings, show all output (not only warnings)Sergio Ahumada2012-09-271-1/+3
| | | | | | | Warnings alone are not always sufficient to debug failures. Change-Id: I48f111aa9ae8c6fc31d314fd028cb6fdac6c855d Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Added an interactively configurable external node classifierRohan McGovern2012-09-031-0/+3
| | | | | | | | | | | | | | | | | Prior to this change, the type of host to be managed was based on the hostname, as per default puppet behavior. This required adding various patterns into a private overlay repository (private_nodes module), and naming hosts according to those patterns. The new setup uses a simple configuration file which can be interactively configured at bootstrap time, hopefully making it much easier to get started with this repository. This also reduces the usage of the private overlay repository (which should eventually be eliminated). Change-Id: Ide4f1d9360a19b16b3dcaedf993951725932a011 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <tjtomkins@gmail.com>
* selftest: added skip_all() type for skipping testsRohan McGovern2012-08-211-3/+19
| | | | | | | This is useful when a test is not applicable on certain platforms. Change-Id: I935f103099284d1277564b5be156925453251fa7 Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* selftest: fixed expect_no_warnings when message contains ':'Rohan McGovern2012-08-031-1/+1
| | | | | | | | | | We were unnecessarily forbidding the usage of the ':' character in test names. That doesn't make much sense, since the name of various puppet types and functions would contain ':' and we might want to include those in the test name. Change-Id: Idebfdd7f4d43c5efa0da4c55a65d88ead85edc7e Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
* selftest: make it possible to test for absence of warningsRohan McGovern2012-08-011-0/+22
| | | | | | | | | Ensuring no warnings can help us to avoid the usage of deprecated puppet coding styles. Change-Id: Iaa93728e5fd262caa61a4fb0a5d494130bc7449d Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Prefer ${^MATCH} over $MATCHRohan McGovern2012-08-011-3/+4
| | | | | | | | | | | | | | The global $MATCH variable has performance issues, replace it with the ${^MATCH} alternative. The performance impact is likely insignificant for this script, but it is nice to use best practices anyway, in case the code is later reused elsewhere. Change-Id: Id9ecd0a2f3270001116082834f7641ae4dbe9d28 Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
* Added basic functional puppet testsRohan McGovern2012-07-241-0/+274
All files in 'tests/*.pp' for a given module will be run with 'puppet apply --noop'. The test passes if puppet gives a 0 exit code. Additionally, expected output from puppet may be encoded by: selftest::expect { "something should happen": output => "expected output" } ... and the test will fail unless all expected output is printed by puppet. Two tests for the baselayout module have been added. Change-Id: I0e5ded53cb8d88579b9ab1e0bde771558647527b Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com> Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com> Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>