Commit graph

432 commits

Author SHA1 Message Date
Ken Barber
5370fbeb10 Fix selinux permissions for fedora tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 13:40:15 +01:00
Ken Barber
a8f86f9df1 Skip firewall tests for Fedora
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 01:32:00 +01:00
Ken Barber
b9598796e0 Calculate default version for Fedora
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-18 00:05:14 +01:00
Ken Barber
cd2bc50cdf Fix repo removal for testing purposes
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-17 22:19:01 +01:00
Ken Barber
ce94eb348a Modify tests for postgresql::server to test for purged state
Since we are now forcing ensure => purged in places, some unit tests need to
be reworked to accept that.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
27c5cc0304 Provide package removal fixes for Debian tests
This patch provides fixes to help tests pass on Debian. The failures were in
relation to the lack of proper removal of the server and contrib parts. Setting
the ensure => purged parameter for removal seems to have solved a lot of this.

Also, the ordering for contrib being (un)installed needed some work.

I've also made sure we use 'purged' a lot more in tests to make sure we clean
up after ourselves properly.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
402a6b9608 Include firewall class in firewall based test
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
a0a2a00a49 Fix debian 7 regexp, rename to default_version and some cleanup
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
7d84b6ac0e Add datadir back, as its used within a lot of tests
Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:17 +01:00
Ken Barber
59c1cbfbf8 Major rewrite to solve order dependencies and unclear public API
This is a very very large change to the module. It started out as a fix to add
postgresl::server::config_entry, and quickly became a rewrite to fix a lot of
ordering issues inherent in the API.

Since this changes the Public API it is considered a backwards compatible
change.

See the upgrading guide in README.md for more details as to what has been
modified in this patch.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-09-14 06:39:15 +01:00
Rahul Gopinath
20bdf10b72 Adding anchors around contained resources 2013-09-14 06:38:53 +01:00
Rahul Gopinath
1dce6454c8 Pulling in pgconf module from camptocamp/puppet-pgconf
This includes the following changes:
  - Hooking up pgconf module to postgresql to manage postgresql.conf
   - pgconf includes a type and provider for postgresql.conf the provider
     is a simple parsed file following basic ini parsing.
  - Add config_entry.pp which wraps the pgconf module.
  - Replace file_line resources by postgresql::config_entry in beforeservice.pp
  - Adding unit tests for the newly introduced functionality
2013-09-14 06:38:53 +01:00
Ashley Penney
efb5daae5d Merge pull request #239 from GregSutcliffe/master
Remove trailing comma which breaks 2.6 compat
2013-09-13 10:43:08 -07:00
Ashley Penney
1d416a6c15 Merge pull request #237 from apenney/travis
Remove 3.0, 3.1, and 2.6 to shrink the test matrix.
2013-09-09 15:00:21 -07:00
Ashley Penney
797cb525d5 Goodbye, create_resources. 2013-09-09 17:59:24 -04:00
Ashley Penney
f56eec8bd9 Merge pull request #243 from apenney/2.4.2-release
2.5.0 release.
2013-09-09 14:44:02 -07:00
Ashley Penney
359401a748 Prepare a 2.5.0 release. 2013-09-09 17:28:18 -04:00
Greg Sutcliffe
ba005467dc Remove trailing comma which breaks 2.6 compat 2013-08-30 13:00:57 +01:00
Ashley Penney
be12f1c55b Remove 3.0, 3.1, and 2.6 to shrink the test matrix.
Oh, and kill off ruby-head.
2013-08-27 15:02:45 -04:00
Ashley Penney
8ce9952600 Merge pull request #236 from apenney/style
Style fixes (and a bugfix)
2013-08-27 12:00:30 -07:00
Ashley Penney
c2d48f1953 Merge pull request #235 from kamilszymanski/db_docs_update
Add missing documentation for istemplate parameter
2013-08-27 12:00:10 -07:00
Ashley Penney
d378d8aa17 Merge pull request #209 from mnencia/patch-1
Tag the postgresql-contrib package as postgresql
2013-08-27 11:58:18 -07:00
Ashley Penney
f7116f5aad Style guide cleanup.
Most of these changes are just simple bits but I've wrapped a bunch of
stuff around 80 lines so it's slightly more readable.  These should all
be no-op changes.
2013-08-26 12:22:13 -04:00
Kamil Szymanski
83086c2712 Add missing documentation for istemplate parameter 2013-08-25 13:22:33 +02:00
Ashley Penney
0ddb9b109a Add the two missing variables that the if check requires. 2013-08-24 12:07:07 -07:00
Ashley Penney
421e9ae71f Merge pull request #212 from hunner/handle_refreshonly
Handle refreshonly correctly
2013-08-19 12:03:15 -07:00
Hunter Haugen
b85a118b57 Add specs for psql Type and Provider 2013-08-13 16:18:02 -07:00
Hunter Haugen
8919359bca Use boolean for refreshonly
Puppet::Type supports `:boolean => true` to create a
`resource.<property>?` method that is true or false based on the
`:true`, `:false`, `true`, or `false` value of the parameter.

This will allow accurate assesment of the refreshonly attribute for
testing.
2013-08-13 16:18:02 -07:00
Hunter Haugen
b2b9b13df8 Merge pull request #218 from fiddyspence/set_postgres_postgrespw
Alter escaping in postgresql::config::afterservice
2013-08-13 16:13:18 -07:00
Hunter Haugen
9d753b40a8 Merge pull request #229 from mcanevet/plperl
Add README entry for postgresql::plperl
2013-08-13 16:07:34 -07:00
Mickaël Canévet
84f79507ed Fix postgresql::plperl documentation 2013-08-12 10:15:25 +02:00
Mickaël Canévet
70c3341c24 Add README entry for postgresql::plperl 2013-08-12 10:14:19 +02:00
Ashley Penney
158ea50558 Merge pull request #228 from kbarber/release-241
Release 2.4.1
2013-08-01 10:55:29 -07:00
Ken Barber
eb7c27d874 Release 2.4.1
This updates the Modulefile and Changelog for release 2.4.1.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-08-01 18:40:06 +01:00
Ashley Penney
a1b9728dd1 Merge pull request #225 from kbarber/ticket/master/GH-216-alter-role-not-idempotent
(GH-216) Alter role call not idempotent with cleartext passwords
2013-08-01 05:53:15 -07: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
fiddyspence
eadfe3bf00 modified tests 2013-07-23 15:13:15 +01:00
fiddyspence
165e12d88e amending the unless on the exec for quoting also 2013-07-23 14:43:45 +01:00
fiddyspence
82d79dd21a reverting path on exec 2013-07-23 13:08:54 +01:00
fiddyspence
2eb03efc29 Alter escaping in postgresql::config::afterservice
This allows non-standard users (pe-postgres) to change passwords. Also
added a function to do escaping of the password, added system tests
and rspec tests for the function.
2013-07-23 13:04:46 +01:00
Ashley Penney
721d5e9033 Merge pull request #213 from hunner/release_2.4.0
Release 2.4.0
2013-07-19 16:25:52 -07:00
Hunter Haugen
f1f5672a9d Release 2.4.0
Summary
-------
This updates adds the ability to change permissions on tables, create
template databases from normal databases, manage PL-Perl's postgres
package, and disable the management of `pg_hba.conf`.

Features
--------
- Add `postgresql::table_grant` defined resource
- Add `postgresql::plperl` class
- Add `manage_pg_hba_conf` parameter to the `postgresql::config` class
- Add `istemplate` parameter to the `postgresql::database` define

Bugfixes
--------
- Update `postgresql::role` class to be able to update roles when
  modified instead of only on creation.
- Update tests
- Fix documentation of `postgresql::database_grant`
2013-07-19 16:21:46 -07:00
Hunter Haugen
847f54ce6c Merge pull request #204 from mcanevet/set_istemplate
Add support for istemplate parameter where creating db
2013-07-19 12:55:16 -07:00
Hunter Haugen
95452ceb90 Merge pull request #205 from mcanevet/plperl
Add support for installing PL/Perl
2013-07-19 12:49:21 -07:00
Marco Nenciarini
2344960980 Tag the postgresql-contrib package as postgresql 2013-07-17 12:10:19 +02:00
Hunter Haugen
9471fa5eb7 Merge pull request #208 from hunner/add_grants
Add grant abilities for more that databases
2013-07-16 15:32:24 -07:00
Hunter Haugen
a946157a42 Update readme 2013-07-16 14:31:28 -07:00
Hunter Haugen
6890a56eb7 Reindent postgresql::database_grant spec 2013-07-16 14:31:28 -07:00
Hunter Haugen
a37eaa053b Split database_grant up
The code to grant permissions databases and their objects has been
abstracted to `postgresql::grant` and is used by both
`postgresql::database_grant` and `postgresql::table_grant`
2013-07-16 14:31:28 -07:00
Mickaël Canévet
5ff47cf1b8 Test plperl only on non standard installation as it does not work on redhat5 2013-07-16 16:06:12 +02:00