You've already forked pgbackrest
mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2025-11-06 08:49:29 +02:00
Add TLS Server.
The TLS server is an alternative to using SSH for protocol connections to remote hosts. This command is currently experimental and intended only for trial and testing. As such, the new commands and options will not show up in the command-line help unless directly requested.
This commit is contained in:
@@ -42,6 +42,7 @@ sub new
|
||||
$self->{strOption},
|
||||
$self->{strParam},
|
||||
$self->{bHostUpdate},
|
||||
$self->{strEntryPoint},
|
||||
) =
|
||||
logDebugParam
|
||||
(
|
||||
@@ -55,6 +56,7 @@ sub new
|
||||
{name => 'strOption', required => false, trace => true},
|
||||
{name => 'strParam', required => false, trace => true},
|
||||
{name => 'bHostUpdate', required => false, trace => true, default => true},
|
||||
{name => 'strEntryPoint', required => false, trace => true},
|
||||
);
|
||||
|
||||
executeTest("docker rm -f $self->{strContainer}", {bSuppressError => true});
|
||||
@@ -62,6 +64,7 @@ sub new
|
||||
executeTest("docker run -itd -h $self->{strName} --name=$self->{strContainer}" .
|
||||
(defined($self->{strOption}) ? ' ' . $self->{strOption} : '') .
|
||||
(defined($self->{stryMount}) ? ' -v ' . join(' -v ', @{$self->{stryMount}}) : '') .
|
||||
(defined($self->{strEntryPoint}) ? " --entrypoint=$self->{strEntryPoint} --user=$self->{strUser}" : '') .
|
||||
" $self->{strImage} " . (defined($self->{strParam}) ? ' ' . $self->{strParam} : ''),
|
||||
{bSuppressStdErr => true});
|
||||
|
||||
|
||||
@@ -407,8 +407,9 @@ sub run
|
||||
# declaration and the renamed implementation.
|
||||
if ($strLine =~ /^{/)
|
||||
{
|
||||
push(@stryShimModuleSrcRenamed, trim($strFunctionDeclaration) . ";");
|
||||
push(@stryShimModuleSrcRenamed, $strFunctionShim);
|
||||
push(
|
||||
@stryShimModuleSrcRenamed,
|
||||
trim($strFunctionDeclaration) . "; " . $strFunctionShim);
|
||||
push(@stryShimModuleSrcRenamed, $strLine);
|
||||
|
||||
$strFunctionShim = undef;
|
||||
@@ -416,7 +417,7 @@ sub run
|
||||
# Else keep constructing the declaration and implementation
|
||||
else
|
||||
{
|
||||
$strFunctionDeclaration .= "${strLine}\n";
|
||||
$strFunctionDeclaration .= trim($strLine);
|
||||
$strFunctionShim .= "${strLine}\n";
|
||||
}
|
||||
}
|
||||
@@ -436,10 +437,10 @@ sub run
|
||||
{
|
||||
my $strLineLast = pop(@stryShimModuleSrcRenamed);
|
||||
|
||||
$strFunctionDeclaration = "${strLineLast} ${strLine}\n";
|
||||
$strFunctionDeclaration = "${strLineLast} ${strLine}";
|
||||
|
||||
$strLine =~ s/^${strFunction}\(/${strFunction}_SHIMMED\(/;
|
||||
$strFunctionShim = "${strLineLast}\n${strLine}\n";
|
||||
$strFunctionShim = "${strLineLast}\n${strLine}";
|
||||
|
||||
$bFound = true;
|
||||
last;
|
||||
|
||||
@@ -48,6 +48,7 @@ sub new
|
||||
$self->{strCommandMain},
|
||||
$self->{strPgSqlBin},
|
||||
$self->{strTestPath},
|
||||
$self->{strRepoPath},
|
||||
) =
|
||||
logDebugParam
|
||||
(
|
||||
@@ -60,6 +61,7 @@ sub new
|
||||
{name => 'strCommandMain', trace => true},
|
||||
{name => 'strPgSqlBin', required => false, trace => true},
|
||||
{name => 'strTestPath', trace => true},
|
||||
{name => 'strRepoPath', trace => true},
|
||||
);
|
||||
|
||||
# Initialize the test log
|
||||
@@ -366,6 +368,9 @@ sub regExpReplaceAll
|
||||
# Replace the test path
|
||||
$strLine =~ s/$self->{strTestPath}/[TEST_PATH]/g;
|
||||
|
||||
# Replace the repo path
|
||||
$strLine =~ s/$self->{strRepoPath}/[REPO_PATH]/g;
|
||||
|
||||
# Replace the pgsql path (if exists)
|
||||
if (defined($self->{strPgSqlBin}))
|
||||
{
|
||||
|
||||
@@ -243,7 +243,7 @@ sub begin
|
||||
{
|
||||
$self->{oExpect} = new pgBackRestTest::Common::LogTest(
|
||||
$self->module(), $self->moduleTest(), $self->runCurrent(), $self->doLogForce(), $strDescription,
|
||||
$self->{strBackRestExe}, $self->pgBinPath(), $self->testPath());
|
||||
$self->{strBackRestExe}, $self->pgBinPath(), $self->testPath(), $self->basePath());
|
||||
|
||||
&log(INFO, ' expect log: ' . $self->{oExpect}->{strFileName});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user