pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: passwordcheck: Add test suite
4+ messages / 3 participants
[nested] [flat]

* pgsql: passwordcheck: Add test suite
@ 2017-09-15 02:46  Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Peter Eisentraut @ 2017-09-15 02:46 UTC (permalink / raw)
  To: pgsql-committers

passwordcheck: Add test suite

Also improve one error message.

Reviewed-by: David Steele <david@pgmasters.net>

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/af7211e92dc2bba66f90de9e5bea6ae5fa914c61

Modified Files
--------------
contrib/passwordcheck/.gitignore                 |  4 ++++
contrib/passwordcheck/Makefile                   |  5 +++++
contrib/passwordcheck/expected/passwordcheck.out | 18 ++++++++++++++++++
contrib/passwordcheck/passwordcheck.c            |  2 +-
contrib/passwordcheck/passwordcheck.conf         |  1 +
contrib/passwordcheck/sql/passwordcheck.sql      | 21 +++++++++++++++++++++
6 files changed, 50 insertions(+), 1 deletion(-)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [COMMITTERS] pgsql: passwordcheck: Add test suite
@ 2017-09-15 03:02  Michael Paquier <michael.paquier@gmail.com>
  parent: Peter Eisentraut <peter_e@gmx.net>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Paquier @ 2017-09-15 03:02 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On Fri, Sep 15, 2017 at 11:46 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
> passwordcheck: Add test suite
>
> Also improve one error message.
>
> Reviewed-by: David Steele <david@pgmasters.net>

Sorry for showing up late for this topic.
+REGRESS_OPTS = --temp-config $(srcdir)/passwordcheck.conf
+REGRESS = passwordcheck
+# disabled because these tests require setting shared_preload_libraries
+NO_INSTALLCHECK = 1
You could have avoided all that by just issuing "load
'passwordcheck';" at the beginning of the test. And you gain support
for installcheck this way.
-- 
Michael


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 4+ messages in thread

* Re: [COMMITTERS] pgsql: passwordcheck: Add test suite
@ 2017-09-15 04:20  Michael Paquier <michael.paquier@gmail.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Michael Paquier @ 2017-09-15 04:20 UTC (permalink / raw)
  To: Peter Eisentraut <peter_e@gmx.net>; +Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On Fri, Sep 15, 2017 at 12:02 PM, Michael Paquier
<michael.paquier@gmail.com> wrote:
> On Fri, Sep 15, 2017 at 11:46 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
>> passwordcheck: Add test suite
>>
>> Also improve one error message.
>>
>> Reviewed-by: David Steele <david@pgmasters.net>
>
> Sorry for showing up late for this topic.
> +REGRESS_OPTS = --temp-config $(srcdir)/passwordcheck.conf
> +REGRESS = passwordcheck
> +# disabled because these tests require setting shared_preload_libraries
> +NO_INSTALLCHECK = 1
> You could have avoided all that by just issuing "load
> 'passwordcheck';" at the beginning of the test. And you gain support
> for installcheck this way.

In short you just need the attached ;)
-- 
Michael

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Attachments:

0001-Simplify-new-test-suite-handling-of-passwordcheck.patch (application/octet-stream, 2.5K) download From eb3acc276cbf4a6045bd4414afd4d767bf15194b Mon Sep 17 00:00:00 2001 From: Michael Paquier <michael@paquier.xyz> Date: Fri, 15 Sep 2017 13:16:14 +0900 Subject: [PATCH] Simplify new test suite handling of passwordcheck This changes the use of a custom configuration file to enforce the value of preload_shared_libraries to simply load the library during the tests. This removes the restriction of running installcheck on the tests, and simplifies its makefile contrary to what has been introduced in af7211e. --- contrib/passwordcheck/Makefile | 3 --- contrib/passwordcheck/expected/passwordcheck.out | 2 ++ contrib/passwordcheck/passwordcheck.conf | 1 - contrib/passwordcheck/sql/passwordcheck.sql | 3 +++ 4 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 contrib/passwordcheck/passwordcheck.conf diff --git a/contrib/passwordcheck/Makefile b/contrib/passwordcheck/Makefile index 7edc968b90..4da0b1417c 100644 --- a/contrib/passwordcheck/Makefile +++ b/contrib/passwordcheck/Makefile @@ -8,10 +8,7 @@ PGFILEDESC = "passwordcheck - strengthen user password checks" # PG_CPPFLAGS = -DUSE_CRACKLIB '-DCRACKLIB_DICTPATH="/usr/lib/cracklib_dict"' # SHLIB_LINK = -lcrack -REGRESS_OPTS = --temp-config $(srcdir)/passwordcheck.conf REGRESS = passwordcheck -# disabled because these tests require setting shared_preload_libraries -NO_INSTALLCHECK = 1 ifdef USE_PGXS PG_CONFIG = pg_config diff --git a/contrib/passwordcheck/expected/passwordcheck.out b/contrib/passwordcheck/expected/passwordcheck.out index b3515df3e8..24e239d80c 100644 --- a/contrib/passwordcheck/expected/passwordcheck.out +++ b/contrib/passwordcheck/expected/passwordcheck.out @@ -1,3 +1,5 @@ +-- Load the extension to validate the tests +LOAD 'passwordcheck'; CREATE USER regress_user1; -- ok ALTER USER regress_user1 PASSWORD 'a_nice_long_password'; diff --git a/contrib/passwordcheck/passwordcheck.conf b/contrib/passwordcheck/passwordcheck.conf deleted file mode 100644 index f6604f3d6b..0000000000 --- a/contrib/passwordcheck/passwordcheck.conf +++ /dev/null @@ -1 +0,0 @@ -shared_preload_libraries = 'passwordcheck' diff --git a/contrib/passwordcheck/sql/passwordcheck.sql b/contrib/passwordcheck/sql/passwordcheck.sql index 59c84f522e..3329756943 100644 --- a/contrib/passwordcheck/sql/passwordcheck.sql +++ b/contrib/passwordcheck/sql/passwordcheck.sql @@ -1,3 +1,6 @@ +-- Load the extension to validate the tests +LOAD 'passwordcheck'; + CREATE USER regress_user1; -- ok -- 2.14.1
^ permalink raw reply [nested|flat] 4+ messages in thread

* Re: [COMMITTERS] pgsql: passwordcheck: Add test suite
@ 2017-11-02 16:57  Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 4+ messages in thread

From: Peter Eisentraut @ 2017-11-02 16:57 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>

On 9/15/17 00:20, Michael Paquier wrote:
> On Fri, Sep 15, 2017 at 12:02 PM, Michael Paquier
> <michael.paquier@gmail.com> wrote:
>> On Fri, Sep 15, 2017 at 11:46 AM, Peter Eisentraut <peter_e@gmx.net> wrote:
>>> passwordcheck: Add test suite
>>>
>>> Also improve one error message.
>>>
>>> Reviewed-by: David Steele <david@pgmasters.net>
>>
>> Sorry for showing up late for this topic.
>> +REGRESS_OPTS = --temp-config $(srcdir)/passwordcheck.conf
>> +REGRESS = passwordcheck
>> +# disabled because these tests require setting shared_preload_libraries
>> +NO_INSTALLCHECK = 1
>> You could have avoided all that by just issuing "load
>> 'passwordcheck';" at the beginning of the test. And you gain support
>> for installcheck this way.
> 
> In short you just need the attached ;)

committed

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



^ permalink  raw  reply  [nested|flat] 4+ messages in thread


end of thread, other threads:[~2017-11-02 16:57 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-09-15 02:46 pgsql: passwordcheck: Add test suite Peter Eisentraut <peter_e@gmx.net>
2017-09-15 03:02 ` Michael Paquier <michael.paquier@gmail.com>
2017-09-15 04:20   ` Michael Paquier <michael.paquier@gmail.com>
2017-11-02 16:57     ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox