From 0e5f5bde49c79cc809c11046d503a1645972f0c7 Mon Sep 17 00:00:00 2001 From: Ashlie Martinez Date: Thu, 5 Oct 2023 12:35:33 -0700 Subject: [PATCH] More Exchange tests for lineage Check the lineage for the base is empty. This can be squashed. --- src/internal/operations/test/exchange_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/internal/operations/test/exchange_test.go b/src/internal/operations/test/exchange_test.go index f8e0a927d..c0ce1dd78 100644 --- a/src/internal/operations/test/exchange_test.go +++ b/src/internal/operations/test/exchange_test.go @@ -175,6 +175,13 @@ func (suite *ExchangeBackupIntgSuite) TestBackup_Run_exchange() { expectDeets, false) + // Lineage for the initial backup should be empty. + bup, err := bod.sw.GetBackup(ctx, bo.Results.BackupID) + require.NoError(t, err, clues.ToCore(err)) + + assert.Empty(t, bup.MergeBases, "base backup merge base lineage") + assert.Empty(t, bup.AssistBases, "base backup assist base lineage") + // Basic, happy path incremental test. No changes are dictated or expected. // This only tests that an incremental backup is runnable at all, and that it // produces fewer results than the last backup. @@ -220,7 +227,7 @@ func (suite *ExchangeBackupIntgSuite) TestBackup_Run_exchange() { // Incremental backup should have the initial backup as a merge base in // the lineage information. - bup, err := bod.sw.GetBackup(ctx, incBO.Results.BackupID) + bup, err = bod.sw.GetBackup(ctx, incBO.Results.BackupID) require.NoError(t, err, clues.ToCore(err)) lineage, err := bup.Bases()