e9370fee7b
This patch includes some very basic and initial unit testing using rspec-puppet and for the case of facts, just normal rspec. I've taken a very light approach here as rspec-puppet can be quite combinatorial when one gets carried away. For now I've just added basic compile failure detection effectively for classes and defined resources. As we continue to work on the code and find regressions this work can be expanded. For facts and functions I've also taken a basic approach for now. One little thing I did change, was the strange string that the fact returns when the default version is undefined. Instead of an error message I've just returned the string 'unknown' which is more in line with other facts I've seen in the wild, and to be quite honest 'unknown' is fairly self-explantory. Since a fact isn't an error reporting message this seemed more appropriate, and looked nicer in the rspec test. As far as travis-ci support, I've added the same configuration that @jmmcune came up with for stdlib which is pretty light and reasonable standard now we propogated that to 4 or so other modules in the puppetlabs/ namespace. It should work out of the box. Signed-off-by: Ken Barber <ken@bob.sh>
27 lines
856 B
Puppet
27 lines
856 B
Puppet
# puppet-postgresql
|
|
# For all details and documentation:
|
|
# http://github.com/inkling/puppet-postgresql
|
|
#
|
|
# Copyright 2012- Inkling Systems, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
|
|
class postgresql_tests::system_default::test_db($db) {
|
|
|
|
include postgresql::server
|
|
|
|
postgresql::db { $db:
|
|
user => $db,
|
|
password => $db,
|
|
}
|
|
}
|