Commit graph

630 commits

Author SHA1 Message Date
Ashley Penney
0ee1b9a2ea Convert specs to RSpec 2.99.1 syntax with Transpec
This conversion is done by Transpec 2.3.1 with the following command:
    transpec -f -c "bundle exec rake spec"

* 82 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 21 conversions
    from: == expected
      to: eq(expected)

* 20 conversions
    from: obj.should
      to: expect(obj).to

* 5 conversions
    from: its([:key]) { }
      to: describe '[:key]' do subject { super()[:key] }; it { } end

* 1 conversion
    from: it { should_not ... }
      to: it { is_expected.not_to ... }

* 1 conversion
    from: its(:attr) { }
      to: describe '#attr' do subject { super().attr }; it { } end

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-07-09 16:39:04 -04:00
Ashley Penney
d7b95e5e1b Remove all the old acceptance tests. 2014-07-09 16:38:53 -04:00
Ashley Penney
72c357a32a Merge pull request #443 from cmurphy/master
Add validate and lint tasks to travis script
2014-07-03 17:42:44 -04:00
Colleen Murphy
4df5590f50 Add validate and lint tasks to travis script 2014-07-03 09:53:58 -07:00
Hunter Haugen
8588b4ad8e Merge pull request #439 from cmurphy/master
Synchronize .travis.yml
2014-06-30 12:07:50 -07:00
Colleen Murphy
c1744f25fc Update Gemfile for .travis.yml defaults 2014-06-30 10:58:43 -07:00
Colleen Murphy
9c3a14de40 Synchronize .travis.yml 2014-06-27 10:55:14 -07:00
Colleen Murphy
6cc739ccf4 Update .sync.yml to support new .travis.yml configs 2014-06-27 10:10:23 -07:00
Ashley Penney
c745a84899 Merge pull request #436 from apenney/fix-typo
Fix trailing }.
2014-06-26 14:28:23 -04:00
Ashley Penney
61bde22f68 Fix trailing }. 2014-06-26 14:27:57 -04:00
Morgan Haskel
d05c56634e Merge pull request #435 from cmurphy/master
Start synchronizing module files
2014-06-26 13:59:49 -04:00
Colleen Murphy
c63a7ba857 Sync files 2014-06-25 17:23:35 -07:00
Colleen Murphy
6dfa6363a9 Add configuration file for modulesync
https://github.com/puppetlabs/modulesync
2014-06-25 16:16:22 -07:00
Ashley Penney
a386c388d0 Merge pull request #433 from apenney/fix-selinux-tests
Add workaround for selinux.
2014-06-24 11:11:29 -04:00
Ashley Penney
5735eea1ac Add workaround for selinux. 2014-06-24 11:11:03 -04:00
Ashley Penney
5d4ecb1b04 Merge pull request #413 from rdark/support/jdbc_repo_dependency
tag postgresql-jdbc package to fix package repo dependency
2014-06-05 13:37:03 -04:00
Ashley Penney
e29f5ef8d8 Merge pull request #422 from dvorak/create_user_role_before_validate
Ensure db user exists before validating db connection
2014-06-05 13:36:24 -04:00
Ashley Penney
53ce9110d7 Merge pull request #414 from lucas42/patch-1
Support Debian Jessie
2014-06-05 13:35:31 -04:00
Ashley Penney
e137cd2d40 Merge pull request #419 from mcanevet/fix/unknown_postgis_version
Set fallback postgis_version to undef so that catalog still compiles if d...
2014-06-05 13:33:56 -04:00
Morgan Haskel
dcd1741c03 Merge pull request #427 from apenney/fix-1404-tests
Fix Ubuntu 14.04 tests for now.
2014-06-03 15:07:48 -04:00
Ashley Penney
8db4a0cf67 Fix Ubuntu 14.04 tests for now.
This doesn't fix the root cause of the issue, such as the fact that
dpkg can't do wildcard removals, and the uninstall fails when you're
passing in a version number like this, but THIS test doesn't care, it
just wants to make sure the deprecation warning appears in the first
place.

This does however make the tests pass on 14.04.
2014-06-03 13:21:45 -04:00
Ashley Penney
9c2e53e86c Merge pull request #426 from domcleal/modules-775-refresh
(MODULES-775) Fix refresh/unless parameter interactions
2014-06-03 09:45:53 -04: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
Morgan Haskel
fbeb8b54b6 Merge pull request #424 from apenney/remove-eq-tests
Remove eq('') tests thanks to the new deprecation warnings.
2014-05-29 12:11:18 -04:00
Ashley Penney
706eb884eb Remove eq('') tests thanks to the new deprecation warnings. 2014-05-29 12:09:08 -04:00
Clayton O'Neill
6e55b9bbb3 Ensure db user exists before validating db connection
The validate_db_connection class takes a user to connect as, but if we're
using the progresql::server::db defined type then the user might not be
created yet, and might not have any permissions granted yet.  This patch
users a collector to ensure that the that the user and grants are active
before validating.
2014-05-23 17:05:17 -04:00
Ashley Penney
7ad1390c1d Merge pull request #421 from blkperl/puppet36_future_parser
Change selector statements to have default listed last
2014-05-22 19:17:28 -07:00
Ashley Penney
d37a2216eb Merge pull request #408 from fredj/readme-typo
Fix wrong config option in README
2014-05-22 19:15:26 -07:00
William Van Hevelingen
fee21d858d Change selector statements to have default listed last
As per the official docs "the default case must be at the end of the list."
http://docs.puppetlabs.com/puppet/latest/reference/lang_conditional.html#selectors

This commit fixes breakage in Puppet 3.6.0 where it enforces the behavior
described above when Future parser is enabled.

See https://tickets.puppetlabs.com/browse/PUP-2642
2014-05-22 15:30:55 -07:00
Mickaël Canévet
3545865302 Set falback postgis_version to undef so that catalog still compiles if default postgresql version is unknown 2014-05-20 11:32:18 +02:00
Ashley Penney
d8fec75635 Merge pull request #409 from mnencia/patch-1
Update apt.postgresql.org key url
2014-05-18 08:02:52 -07:00
Morgan Haskel
a06a061952 Merge pull request #417 from apenney/fix-platforms
Add RHEL7 and Ubuntu 14.04.
2014-05-13 16:20:36 -04:00
Ashley Penney
8bf9bda098 Add RHEL7 and Ubuntu 14.04. 2014-05-13 22:19:45 +02:00
Ashley Penney
131aa5dbb3 Merge pull request #416 from apenney/merge33x
Merge33x
2014-05-13 15:44:13 -04:00
Ashley Penney
bd1eec24d0 Merge branch '3.3.x' into merge33x 2014-05-13 21:08:41 +02:00
Ashley Penney
78bbe0d947 Merge pull request #415 from apenney/rhel7
[WIP] Fixes to tests and RHEL7 support.
2014-05-13 15:02:56 -04:00
Ashley Penney
bb26d47090 Merge branch 'rhel7' of https://github.com/apenney/puppetlabs-postgresql into rhel7 2014-05-13 20:25:19 +02:00
Ashley Penney
246725cfb9 Fix postgis so it installs the approprate RHEL5 package.
In RHEL5 the package was just named 'postgis' in the external repos,
rather than postgis$package_version.
2014-05-13 20:24:28 +02:00
Ashley Penney
636e693821 Merge pull request #5 from mhaskel/rhel7
Need to flush iptables on rhel5.
2014-05-13 14:09:53 -04:00
Morgan Haskel
d51e9779f0 Need to flush iptables on rhel5. 2014-05-13 14:07:46 -04:00
Ashley Penney
2c58670bea Merge pull request #4 from mhaskel/rhel7
If we're just testing for a warning no need to start up the services.
2014-05-13 12:29:35 -04:00
Morgan Haskel
f004ca39f3 If we're just testing for a warning no need to start up the services. 2014-05-13 12:10:44 -04:00
Ashley Penney
abe2b9ceb2 Merge pull request #3 from mhaskel/rhel7
'!' binds before 'and'.
2014-05-13 11:02:47 -04:00
Morgan Haskel
906794d3ce '!' binds before 'and'.
This caused the repo not to be included on RHEL5 and added extra failures.
2014-05-13 10:54:09 -04:00
Ashley Penney
911b868bcb Merge pull request #2 from mhaskel/rhel7
Fix validate_db_connection_spec.
2014-05-12 21:17:47 -04:00
Morgan Haskel
46d3717c34 Fix validate_db_connection_spec.
The for loop inside the shell() was confusing things (although it's unclear why.  I don't think we need to be looping in the spec, and this works.
2014-05-12 21:00:13 -04:00
Ashley Penney
ff59d421f9 See if this fixes puppet 2.7. 2014-05-13 00:52:29 +02:00
Ashley Penney
192ea5e3f3 Fix service_ensure.
We now test if service_ensure is 'running' or 'stopped' but it was
actually picking up the default value of ensure in params.pp which
was true, not present.

Fix this and thereby fix the failing test.
2014-05-12 23:34:25 +02:00
Ashley Penney
c00b47f220 Restructure the tests here to be cleaner. 2014-05-12 23:28:18 +02:00
Ashley Penney
f37b3a6ba5 Fixes broken tests and add a service_ensure test. 2014-05-12 23:25:05 +02:00