You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2026-05-22 10:15:16 +02:00
Remove pgbackrest test user.
This user was created before we tested in containers to ensure isolation between the pg and repo hosts which were then just directories. The downside is that this resulted in a lot of sudos to set the pgbackrest user and to remove files which did not belong to the main test user. Containers provide isolation without needing separate users so we can now safely remove the pgbackrest user. This allows us to remove most sudos, except where they are explicitly needed in tests. While we're at it, remove the code that installed the Perl C library (which also required sudo) and simply add the build path to @INC instead.
This commit is contained in:
@@ -84,7 +84,7 @@ sub testPathRemove
|
||||
my $strPath = shift;
|
||||
my $bSuppressError = shift;
|
||||
|
||||
executeTest('sudo rm -rf ' . $strPath, {bSuppressError => $bSuppressError});
|
||||
executeTest('rm -rf ' . $strPath, {bSuppressError => $bSuppressError});
|
||||
}
|
||||
|
||||
push(@EXPORT, qw(testPathRemove));
|
||||
@@ -170,7 +170,7 @@ sub forceStorageMode
|
||||
# Mode commands are ignored on S3
|
||||
if ($oStorage->type() ne STORAGE_S3)
|
||||
{
|
||||
executeTest('sudo chmod ' . ($bRecurse ? '-R ' : '') . "${strMode} " . $oStorage->pathGet($strPathExp));
|
||||
executeTest('chmod ' . ($bRecurse ? '-R ' : '') . "${strMode} " . $oStorage->pathGet($strPathExp));
|
||||
}
|
||||
|
||||
# Return from function and log return values if any
|
||||
@@ -237,7 +237,7 @@ sub forceStorageMove
|
||||
# Else remove using filesystem commands
|
||||
else
|
||||
{
|
||||
executeTest('sudo mv ' . $oStorage->pathGet($strSourcePathExp) . ' ' . $oStorage->pathGet($strDestinationPathExp));
|
||||
executeTest('mv ' . $oStorage->pathGet($strSourcePathExp) . ' ' . $oStorage->pathGet($strDestinationPathExp));
|
||||
}
|
||||
|
||||
# Return from function and log return values if any
|
||||
@@ -272,7 +272,7 @@ sub forceStorageOwner
|
||||
# Owner commands are ignored on S3
|
||||
if ($oStorage->type() ne STORAGE_S3)
|
||||
{
|
||||
executeTest('sudo chown ' . ($bRecurse ? '-R ' : '') . "${strOwner} " . $oStorage->pathGet($strPathExp));
|
||||
executeTest('chown ' . ($bRecurse ? '-R ' : '') . "${strOwner} " . $oStorage->pathGet($strPathExp));
|
||||
}
|
||||
|
||||
# Return from function and log return values if any
|
||||
@@ -318,7 +318,7 @@ sub forceStorageRemove
|
||||
}
|
||||
else
|
||||
{
|
||||
executeTest('sudo rm -f' . ($bRecurse ? 'r ' : ' ') . $oStorage->pathGet($strPathExp));
|
||||
executeTest('rm -f' . ($bRecurse ? 'r ' : ' ') . $oStorage->pathGet($strPathExp));
|
||||
}
|
||||
|
||||
# Return from function and log return values if any
|
||||
|
||||
Reference in New Issue
Block a user