mirror of
https://github.com/pgbackrest/pgbackrest.git
synced 2024-12-14 10:13:05 +02:00
Add manifestFree().
This commit is contained in:
parent
fead004691
commit
4239f8a81a
@ -164,6 +164,7 @@ struct Manifest
|
||||
};
|
||||
|
||||
OBJECT_DEFINE_MOVE(MANIFEST);
|
||||
OBJECT_DEFINE_FREE(MANIFEST);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Internal functions to add types to their lists
|
||||
|
@ -264,6 +264,11 @@ const ManifestData *manifestData(const Manifest *this);
|
||||
// Set backup label
|
||||
void manifestBackupLabelSet(Manifest *this, const String *backupLabel);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Destructor
|
||||
***********************************************************************************************************************************/
|
||||
void manifestFree(Manifest *this);
|
||||
|
||||
/***********************************************************************************************************************************
|
||||
Helper functions
|
||||
***********************************************************************************************************************************/
|
||||
|
@ -2010,7 +2010,7 @@ testRun(void)
|
||||
}
|
||||
|
||||
// *****************************************************************************************************************************
|
||||
if (testBegin("manifestLoadFile()"))
|
||||
if (testBegin("manifestLoadFile(), manifestFree()"))
|
||||
{
|
||||
Manifest *manifest = NULL;
|
||||
|
||||
@ -2090,5 +2090,8 @@ testRun(void)
|
||||
storagePutP(storageNewWriteP(storageTest, BACKUP_MANIFEST_FILE_STR), content), "write main");
|
||||
TEST_ASSIGN(manifest, manifestLoadFile(storageTest, STRDEF(BACKUP_MANIFEST_FILE), cipherTypeNone, NULL), "load main");
|
||||
TEST_RESULT_UINT(manifestData(manifest)->pgSystemId, 1000000000000000094, " check file loaded");
|
||||
|
||||
TEST_RESULT_VOID(manifestFree(manifest), "free manifest");
|
||||
TEST_RESULT_VOID(manifestFree(NULL), "free null manifest");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user