1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-12 10:04:14 +02:00

Allow mock integration tests for all VM types.

Previously the mock integration tests would be skipped for VMs other than the standard four used in CI.  Now VMs outside the standard four will run the same tests as VM4 (currently U18).
This commit is contained in:
David Steele 2019-11-02 10:35:48 +01:00
parent b3e5d88304
commit 8b682b75d2
6 changed files with 22 additions and 5 deletions

View File

@ -512,6 +512,23 @@ sub vmValid
push @EXPORT, qw(vmValid);
####################################################################################################################################
# Which vm to use for the test matrix. If one of the standard four, then use that, else use VM4.
####################################################################################################################################
sub vmTest
{
my $strVm = shift;
if (grep(/^$strVm$/, VM_LIST))
{
return $strVm;
}
return VM4;
}
push @EXPORT, qw(vmTest);
####################################################################################################################################
# vmGet
####################################################################################################################################

View File

@ -73,7 +73,7 @@ sub run
)
{
# Only run tests for this vm
next if ($rhRun->{vm} ne $self->vm());
next if ($rhRun->{vm} ne vmTest($self->vm()));
# Increment the run, log, and decide whether this unit test should be run
my $bRemote = $rhRun->{remote};

View File

@ -55,7 +55,7 @@ sub run
)
{
# Only run tests for this vm
next if ($rhRun->{vm} ne $self->vm());
next if ($rhRun->{vm} ne vmTest($self->vm()));
# Increment the run, log, and decide whether this unit test should be run
my $bRemote = $rhRun->{remote};

View File

@ -93,7 +93,7 @@ sub run
)
{
# Only run tests for this vm
next if ($rhRun->{vm} ne $self->vm());
next if ($rhRun->{vm} ne vmTest($self->vm()));
# Increment the run, log, and decide whether this unit test should be run
my $bRemote = $rhRun->{remote};

View File

@ -85,7 +85,7 @@ sub run
)
{
# Only run tests for this vm
next if ($rhRun->{vm} ne $self->vm());
next if ($rhRun->{vm} ne vmTest($self->vm()));
# Increment the run, log, and decide whether this unit test should be run
my $bS3 = $rhRun->{s3};

View File

@ -64,7 +64,7 @@ sub run
)
{
# Only run tests for this vm
next if ($rhRun->{vm} ne $self->vm());
next if ($rhRun->{vm} ne vmTest($self->vm()));
# Increment the run, log, and decide whether this unit test should be run
my $bRemote = $rhRun->{remote};