From aa3e5b8c72a75a4f5fea93b543a8fbedcd713f02 Mon Sep 17 00:00:00 2001 From: David Steele Date: Wed, 30 Jan 2019 17:03:17 +0200 Subject: [PATCH] Allow primary gid for the test user to be different from uid. Apparently up until now they have always been the same, which is pretty typical. However, if they were not then ContainerTest.pm was not happy. --- doc/xml/release.xml | 4 ++++ test/lib/pgBackRestTest/Common/ContainerTest.pm | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/doc/xml/release.xml b/doc/xml/release.xml index 7d511a567..ebde8ea05 100644 --- a/doc/xml/release.xml +++ b/doc/xml/release.xml @@ -183,6 +183,10 @@

Move C module include in test.c above headers included for testing.

+ +

Allow primary gid for the test user to be different from uid.

+
+

Increase timeout in storage/s3 module to improve reliability.

diff --git a/test/lib/pgBackRestTest/Common/ContainerTest.pm b/test/lib/pgBackRestTest/Common/ContainerTest.pm index ba86c48f1..f67bc0a25 100755 --- a/test/lib/pgBackRestTest/Common/ContainerTest.pm +++ b/test/lib/pgBackRestTest/Common/ContainerTest.pm @@ -34,12 +34,12 @@ use constant POSTGRES_GROUP_ID => 5000; use constant POSTGRES_USER => POSTGRES_GROUP; use constant POSTGRES_USER_ID => 5000; -use constant TEST_GROUP => getgrgid($UID) . ''; - push @EXPORT, qw(TEST_GROUP); -use constant TEST_GROUP_ID => getgrnam(TEST_GROUP) . ''; use constant TEST_USER => getpwuid($UID) . ''; push @EXPORT, qw(TEST_USER); use constant TEST_USER_ID => $UID; +use constant TEST_GROUP => getgrgid((getpwnam(TEST_USER))[3]) . ''; + push @EXPORT, qw(TEST_GROUP); +use constant TEST_GROUP_ID => getgrnam(TEST_GROUP) . ''; use constant BACKREST_USER => 'pgbackrest'; push @EXPORT, qw(BACKREST_USER);