1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-07 00:35:37 +02:00

Remove integration expect log testing.

Integration expect log testing was originally used as a rough-and-ready way to make sure that certain code paths were being executed before the unit tests existed. Now that we have 100% unit test coverage (with expect log testing) the value of the integration expect tests seems minimal at best.

But they do cause numerous issues:

- Maintenance of the expect code and replacements that are required to keep logs reproducible.
- Even a trivial change can cause massive churn in the expect logs, e.g. d9088b2. These changes should be minutely audited but since the expect logs have little value now it is seldom worth the effort.
- The OS version used to do expect testing (RHEL7) can only be used to test one version of PostgreSQL. This makes it hard to balance the PostgreSQL version testing between OS versions.
- When a commit affects expect logs it is not clear (especially for new developers) how to regenerate them and our contributing guide is silent on the issue.

The goal is to migrate the integration tests to C and expect testing is not part of that plan. It seems best to get rid of them now.
This commit is contained in:
David Steele
2022-05-10 13:18:26 -04:00
committed by GitHub
parent 3a40394472
commit de816a0f57
34 changed files with 84 additions and 14101 deletions

View File

@ -57,21 +57,16 @@ sub run
my $strStorage = $rhRun->{storage};
my $bEncrypt = $rhRun->{encrypt};
if ($strStorage ne POSIX && ($self->vm() eq VM3))
{
confess &log("cannot configure non-posix storage for expect log tests");
}
############################################################################################################################
if ($self->begin("simple, enc ${bEncrypt}, storage ${strStorage}"))
{
# Create hosts, file object, and config
my ($oHostDbPrimary, $oHostDbStandby, $oHostBackup) = $self->setup(
true, $self->expect(), {strStorage => $strStorage, bRepoEncrypt => $bEncrypt});
true, {strStorage => $strStorage, bRepoEncrypt => $bEncrypt});
# Create the test object
my $oExpireTest = new pgBackRestTest::Env::ExpireEnvTest(
$oHostBackup, $self->backrestExe(), storageRepo(), $oHostDbPrimary->dbPath(), $self->expect(), $self);
$oHostBackup, $self->backrestExe(), storageRepo(), $oHostDbPrimary->dbPath(), $self);
$oExpireTest->stanzaCreate($self->stanza(), PG_VERSION_92);
@ -159,11 +154,11 @@ sub run
{
# Create hosts, file object, and config
my ($oHostDbPrimary, $oHostDbStandby, $oHostBackup) = $self->setup(
true, $self->expect(), {strStorage => $strStorage, bRepoEncrypt => $bEncrypt});
true, {strStorage => $strStorage, bRepoEncrypt => $bEncrypt});
# Create the test object
my $oExpireTest = new pgBackRestTest::Env::ExpireEnvTest(
$oHostBackup, $self->backrestExe(), storageRepo(), $oHostDbPrimary->dbPath(), $self->expect(), $self);
$oHostBackup, $self->backrestExe(), storageRepo(), $oHostDbPrimary->dbPath(), $self);
$oExpireTest->stanzaCreate($self->stanza(), PG_VERSION_92);