module-postgresql/spec/acceptance
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
..
lib Add class postgresql::lib::perl for perl support 2014-04-04 06:13:30 -07:00
nodesets Merge branch '3.3.x' into merge33x 2014-05-13 21:08:41 +02:00
server Merge branch '3.3.x' into merge33x 2014-05-13 21:08:41 +02:00
client_spec.rb Add unsupported platforms 2014-02-27 11:29:59 -08:00
common_patterns_spec.rb Add unsupported platforms 2014-02-27 11:29:59 -08:00
contrib_spec.rb Add unsupported platforms 2014-02-27 11:29:59 -08:00
postgis_spec.rb Various test updates to handle RHEL7 better. 2014-05-08 16:48:57 -04:00
postgresql_psql_spec.rb (MODULES-775) Fix refresh/unless parameter interactions 2014-06-03 10:25:13 +01:00
server_spec.rb Remove eq('') tests thanks to the new deprecation warnings. 2014-05-29 12:09:08 -04:00
unsupported_spec.rb Add unsupported platforms 2014-02-27 11:29:59 -08:00
validate_db_connection_spec.rb Fix validate_db_connection_spec. 2014-05-12 21:00:13 -04:00