Commit graph

25 commits

Author SHA1 Message Date
Karel Brezina
ed29a9931d RSpec tests were fixed to work properly with included postgresql_puppet_extras.conf 2013-01-31 15:56:50 +01:00
Chris Price
a4ec366811 WIP - adding support for an 'included' config file 2013-01-31 15:56:48 +01:00
Chris Price
7b080970c8 WIP 2013-01-31 15:56:18 +01:00
Chris Price
6e4ea18e8b Merge pull request #100 from kbrezina/master
Support for tablespaces
2013-01-30 11:31:22 -08:00
Karel Brezina
8a01e1917c Improved tablespace rspec test 2013-01-30 14:35:14 +01:00
Chris Price
83861ebd29 Update spec/README.md 2013-01-29 10:54:27 -08:00
Karel Brezina
9114490e9d Tablespacing improvements 2013-01-29 14:05:15 +01:00
Karel Brezina
fad93fbeea Added support for tablespaces 2013-01-28 18:01:11 +01:00
Ken Barber
faeac44713 Manage official postgres apt repo
Previously we hadn't supported using the official PostgreSQL repos for deb-based
packaging. This commit fixes that by introducing the management of the apt
repositories on the host as required, and using the correct package and service
name.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-01-15 11:00:24 -08:00
Chris Price
45669b7f8b Add remaining params to init.pp, and update tests 2013-01-11 14:23:56 -08:00
Ken Barber
e1acc2774f Fix inherits issue with validate_db_connection
Previously the validate_db_connection defined type was trying to use inherits
like a class. This of course would fail.

After analyzing its usage, I've removed the need for the top-level params
inherit by just including the 'postgresql' module which pulls in the client
package and the params class as well. It also avoids resource duplication
for the client package as well.

To ensure we don't get regression on this I've added system tests that test
this defined type in a success and failure state.

Signed-off-by: Ken Barber <ken@bob.sh>
2013-01-11 21:57:38 +00:00
Chris Price
97af59e701 Fix GPG key for yum.postgresl.org
The GPG key for yum.postgresql.org was in the wrong directory,
and as written, would have only supported postgres 9.2 anyway.

I looked at the yum rpms for a few other versions besides 9.2,
and they appear to be using the same GPG key.  So this commit
assumes that they all are doing so, and it sets things up
accordingly.  Hopefully this will make the yumrepo support
compatible with other versions of postgres besides 9.2, but I
haven't added that to the actual test matrix yet.
2012-12-07 11:34:30 -08:00
Chris Price
228e5c5337 Cleanup and move control of version into params
Thanks to some tricks I learned from Nan Liu and Dan Bode, I was
able to figure out a way to move all of the new version-related stuff
back into the params class, and clean up some of the if/_real stuff.

Basic tests for centos6 + pg 9.2 are passing.
2012-12-04 14:12:41 -08:00
Chris Price
18167c7a3e Merge platform.pp back into params.pp
Nan showed me a trick that will let us keep all of that param stuff
inside of params.pp, make it a parameterized class, and still support
the ability for users to specify a custom (non-system-default) pg
version.  This commit takes the first step towards that pattern by
consolidating platform.pp and params.pp.  (Everything old is new again!)
2012-12-04 14:12:34 -08:00
Chris Price
fa24f24397 Re-add support for managing yumrepo
This commit creates a new class called `package_source_info`,
which has some initial framework for managing the postgresql.org
yumrepo.  It also serves as a container for the 'version'
variable that is needed by the 'platform' class in order to
use other versions of postgres besides the system default.
2012-12-02 23:06:36 -08:00
Chris Price
663c779309 A few minor fixes to get tests passing again 2012-12-02 22:05:57 -08:00
Chris Price
1b82be0f89 A little more framework for CentOS pg9 testing 2012-12-02 20:47:04 -08:00
Chris Price
cf32763937 A bit more refactoring of test context code 2012-12-02 16:41:35 -08:00
Chris Price
df92c96791 Refactor tests and add CentOS6 image
This commit does a fairly major refactor of how the spec tests
are laid out.  The main goal was to make it easier to run
a subset of the tests--e.g., the ability to only run tests
on a single OS via a simple rspec command.

The test logic is now defined in some shared examples in the
`support` directory.  There are now spec folders for each
distro, which contain some stubs to include the shared examples
as well as a Vagrantfile for the particular distro.

Also, the system-default postgres package tests now run
successfully against the CentOS6 VM that is defined by the
Vagrantfile.
2012-12-02 15:28:25 -08:00
Chris Price
bdecbe6503 Framework for testing on Cent6 / PG9
This commit does the following:

* Adds a CentOS6 vm to the Vagrantfile
* Reorganizes the spec test file a bit so that it will be easy
  to test various things on different VMs.

This is in preparation for adding some PG9 tests to run on
Cent6.
2012-11-30 17:27:23 -08:00
Chris Price
2a922f104a Initial working implementation of ruby psql type/provider
This commit provides a working implementation of a ruby
type/provider (`postgresql_psql` for handling the PSQL
commands.  This is a little more flexible than doing it
via Exec resources, which is what the `postgresql::psql`
type was doing.

The old type is still present but now includes a
deprecation notification, and all of the other types
that were using the `::psql` type have been ported over
to use the `postgresql_psql` type instead.
2012-11-04 21:47:49 -08:00
Chris Price
8529c1fa46 Add deprecation warning for postgres::psql
This commit adds a deprecation warning for the
Exec-based postgres::psql type, and a test
to verify that the deprecation warning is
being generated.
2012-10-27 18:41:47 -07:00
Chris Price
32b65b874a Fix tests so that they can be run multiple times
One of the spec tests was creating a table to test
some user privileges.  However, it wasn't dropping
the table afterwards, meaning that the same test
would fail on the next run because that table already
existed.  This commit adds a command to drop the
table so that the tests can be run several times
in sequence.
2012-10-27 18:04:15 -07:00
Chris Price
9eab95eee0 Update Vagrant tests to be compatible with new structure 2012-07-29 13:35:39 -07:00
Kenneth Knowles
01c9cbeb7c Initial commit 2012-04-19 15:37:18 -07:00