Commit graph

29 commits

Author SHA1 Message Date
David Schmitt
793f51554b (MAINT) Update for modulesync_config 72d19f184 2016-07-27 15:56:35 +01:00
David Schmitt
6cb8d100d0 (MODULES-3581) modulesync [067d08a] 2016-07-08 13:34:33 +01:00
David Schmitt
8ce25cc6f3 (FM-4046) Update to current msync configs [006831f]
This moves all copyright statements to the NOTICE file in accordance with the ASFs guidelines on applying the Apache-2.0 license.
2016-02-16 16:33:49 +00:00
David Schmitt
6e6d242419 (FM-4049) Update to current msync configs [2c99161] 2016-01-27 14:46:24 +00:00
Travis Fields
2aa3217426 (maint) Add beaker-puppet_install_helper and fix fact bug
- Issue with fact() was being called against default instead of
  using fact_on when iterating against each host, also was installing 3.8.1 despite
  specifying PUPPET_VERSION=1.1.1 so updated to use beaker-puppet_install_helper
2015-06-18 15:15:30 -07:00
Morgan Haskel
3341b73b39 beaker gemfile fixes 2015-05-06 14:32:56 -07:00
Morgan Haskel
6e9e62e9c9 sync via modulesync 2015-05-06 14:31:09 -07:00
Morgan Haskel
41f7a7f30d sync via modulesync 2015-05-06 14:10:32 -07:00
Alice Nodelman
ec6967efda (BKR-147) add Gemfile setting for BEAKER_VERSION for puppet...
puppetdb, etc

- support for BEAKER_VERSION and BEAKER_RSPEC_VERSION in gemfile
2015-03-24 14:57:37 -07:00
Colleen Murphy
969287c2fd Remove unneeded dependencies
puppetlabs_spec_helper handles these dependencies for us.
2015-03-19 13:56:05 -07:00
Colleen Murphy
e049fbc464 Update rspec-puppet tests for 2.0
This patch replaces `subject` with `catalogue` for the raise_error
matchers because `subject` no longer contains Puppet errors. We also
unpin rspec-puppet.
2015-03-19 13:55:26 -07:00
Colleen Murphy
6d9768ac38 Pin rspec gems 2015-02-04 17:02:04 +01:00
Colleen Murphy
6bb80dbd69 Add json gem
The puppet_facts gem implicitly depends on the json gem.
On Ruby 1.8.7, json is not built in. On Puppet 2.7, it is
not explicitly pulled in by the hiera gem. So we add it
here explicitly.
2014-12-08 22:52:37 -08:00
Colleen Murphy
ec2397d343 Update .travis.yml, Gemfile, Rakefile, and CONTRIBUTING.md 2014-12-08 10:23:41 -08:00
Colleen Murphy
c1744f25fc Update Gemfile for .travis.yml defaults 2014-06-30 10:58:43 -07:00
Colleen Murphy
c63a7ba857 Sync files 2014-06-25 17:23:35 -07:00
Dominic Cleal
b7cbe60d4b (MODULES-775) Fix refresh/unless parameter interactions
Interactions between resource refreshes and the 'unless' parameter have been
fixed to follow the behaviour of the 'exec' type.

The 'unless' parameter is now always taken into account, whether in ordinary
operation, during a refresh, or when refreshonly is set to true.  The resource
will not run the SQL command when the 'unless' clause matches a row.

Previously a refresh on a resource would ignore the 'unless' parameter if set
which could cause a failure re-running a command, such as attempting to create
a role that already exists.

The following examples have been fixed:

  * should not run SQL when refreshed and the unless query returns rows
  * with refreshonly should not run SQL when the unless query returns no rows
  * with refreshonly should not run SQL when refreshed and the unless query
    returns rows

This is done by moving the logic for refreshonly and whether to run the SQL
command from the provider into the type, and consolidating it in the
should_run_sql method which is called during 'command' property retrieval
(instead of sync) and during refresh.
2014-06-03 10:25:13 +01:00
Ashley Penney
bd1eec24d0 Merge branch '3.3.x' into merge33x 2014-05-13 21:08:41 +02:00
Igor Galić
5b386f1d49 Fixed travis by updating Gemfile to pin Rake to 10.1.1
The latest Rake update requires Ruby >= 1.9. This update
fixes the failing 1.8.7 tests by pinning Rake to the last
supported version on ruby 1.8.7.

This patch is borrowed from @blkperl
2014-03-27 21:29:17 +01:00
Mickaël Canévet
67cd6f73f4 Fix unit tests with rspec-puppet 1.0 2014-03-21 13:58:26 +01:00
Hunter Haugen
ea537281d7 Add class apt for manage_package_repo => true 2014-02-28 17:41:00 -08:00
Hunter Haugen
969cc8b7f1 Allow custom gemsource 2014-02-11 16:38:16 -08:00
Ashley Penney
a353e8e16d Convert rspec-system tests over to beaker.
This work converts all the tests over to beaker.  Some things are
done slightly different in beaker, we rely much more heavily on
catch_failures rather than explicitly laying out the exit codes we
want but I have attempted to preserve the spirit of all tests.
2014-01-23 19:07:04 -05:00
Joshua Hoblitt
c152cd40e7 peg rspec-puppet gem version < 1
rspec-puppet >= 1.0 removed the catalogue method which breaks the param
method in `spec/spec_helper.rb`.  Hopefully, this method will be re-added
in a subsequent release.
2014-01-07 15:13:45 -07:00
Ken Barber
809003d0f9 serverspec + some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-19 16:30:15 +01:00
Ken Barber
9c2dab95aa (GH-216) Alter role call not idempotent with cleartext passwords
The postgresql::role defined type was not idempotent when passed cleartext
passwords. This is because we were comparing it with its md5 equivalent in
the db.

This patch converts any cleartext passwords to md5 before comparison, but
only if they are cleartext (ie. not starting with md5).

I also bumped the version of rspec-system-puppet to get use of the refresh
method, plus did some cleanup because the old tests were a bit dusty, again
taking advantage of refresh plus changing some matchers for clarity.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-08-01 03:18:46 +01:00
Ken Barber
80c85e8f2b Convert system tests to use rspec-system
This patch ports all of the existing system tests to use rspec-system instead.

To assist with this conversion some patches were made to fix OS compatibility
where necessary. We also added an ensure parameter to the postgresql::server
class to assist with removing PostgreSQL configuration to aid with testing
cleanups.

The documentation has been updated to indicate test usage with rspec-system,
we've also renamed the 'tests' directory to 'examples'.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-06-04 15:36:24 +01:00
Ken Barber
794ef22934 Fix versions for travis-ci
This fixes some mistakes in the .travis.yml file:

* Corrects matches so the minor gem revisions get rounded, this means 2.6.0
  for example is used.
* Adds Ruby 2.0.0 tests
* Allows 2.6.0 to fail for now, as it doesn't have create_resources.
* Removes trailing commas and arrays in functions for 2.6.0.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-02-26 14:32:25 +00:00
Ken Barber
e9370fee7b Add unit tests and travis-ci support
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>
2013-02-05 15:15:03 +00:00