Add additional unit test
This commit is contained in:
parent
eaf1429d19
commit
333cd58f79
@ -743,6 +743,38 @@ func (suite *BackupCleanupUnitSuite) TestCleanupOrphanedData() {
|
|||||||
buffer: 24 * time.Hour,
|
buffer: 24 * time.Hour,
|
||||||
expectErr: assert.NoError,
|
expectErr: assert.NoError,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
// Test that an assist base that has the same Reasons as a newer merge
|
||||||
|
// base but the merge base is from an older version of corso that doesn't
|
||||||
|
// add merge or assist base tags for some reason causes the assist base to
|
||||||
|
// be garbage collected.
|
||||||
|
name: "AssistAndLegacyMergeBases NotYoungest Noops",
|
||||||
|
snapshots: []*manifest.EntryMetadata{
|
||||||
|
manifestWithReasons(
|
||||||
|
manifestWithTime(baseTime, snapCurrent()),
|
||||||
|
"tenant1",
|
||||||
|
NewReason("", "ro", path.ExchangeService, path.EmailCategory)),
|
||||||
|
manifestWithTime(baseTime, deetsCurrent()),
|
||||||
|
|
||||||
|
manifestWithReasons(
|
||||||
|
manifestWithTime(baseTime.Add(time.Second), snapCurrent2()),
|
||||||
|
"tenant1",
|
||||||
|
NewReason("", "ro", path.ExchangeService, path.EmailCategory)),
|
||||||
|
manifestWithTime(baseTime.Add(time.Second), deetsCurrent2()),
|
||||||
|
},
|
||||||
|
backups: []backupRes{
|
||||||
|
{bup: backupWithResource("ro", true, backupWithTime(baseTime, bupCurrent()))},
|
||||||
|
{bup: backupWithLegacyResource("ro", backupWithTime(baseTime.Add(time.Second), bupCurrent2()))},
|
||||||
|
},
|
||||||
|
time: baseTime.Add(48 * time.Hour),
|
||||||
|
buffer: 24 * time.Hour,
|
||||||
|
expectDeleteIDs: []manifest.ID{
|
||||||
|
snapCurrent().ID,
|
||||||
|
deetsCurrent().ID,
|
||||||
|
manifest.ID(bupCurrent().ModelStoreID),
|
||||||
|
},
|
||||||
|
expectErr: assert.NoError,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
// Test that an assist base that has the same Reasons as a newer merge
|
// Test that an assist base that has the same Reasons as a newer merge
|
||||||
// base but the merge base is from an older version of corso for some
|
// base but the merge base is from an older version of corso for some
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user