diff --git a/src/internal/m365/exchange/mock/event.go b/src/internal/m365/exchange/mock/event.go index bc7be481c..b94718979 100644 --- a/src/internal/m365/exchange/mock/event.go +++ b/src/internal/m365/exchange/mock/event.go @@ -407,8 +407,8 @@ func EventWithAttendeesBytes(subject string) []byte { // Body must contain a well-formatted string, consumable in a json payload. IE: no unescaped newlines. func EventWith( organizer, subject, body, bodyPreview, - originalStartDate, startDateTime, endDateTime, recurrence, attendees string, - attachments string, cancelledOccurrences, exceptionOccurrences string, + originalStartDate, startDateTime, endDateTime, recurrence, attendees, + attachments, cancelledOccurrences, exceptionOccurrences string, ) []byte { hasAttachments := len(attachments) > 0 startDateTime = strings.TrimSuffix(startDateTime, "Z") diff --git a/src/internal/operations/backup_integration_test.go b/src/internal/operations/backup_integration_test.go index 5c1871ded..49f8e17be 100644 --- a/src/internal/operations/backup_integration_test.go +++ b/src/internal/operations/backup_integration_test.go @@ -749,8 +749,7 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont categories = map[path.CategoryType][]string{ path.EmailCategory: exchange.MetadataFileNames(path.EmailCategory), path.ContactsCategory: exchange.MetadataFileNames(path.ContactsCategory), - // TODO: not currently functioning; cannot retrieve generated calendars - // path.EventsCategory: exchange.MetadataFileNames(path.EventsCategory), + path.EventsCategory: exchange.MetadataFileNames(path.EventsCategory), } container1 = fmt.Sprintf("%s%d_%s", incrementalsDestContainerPrefix, 1, now) container2 = fmt.Sprintf("%s%d_%s", incrementalsDestContainerPrefix, 2, now) @@ -773,7 +772,8 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont sel.Include( sel.MailFolders(containers, selectors.PrefixMatch()), - sel.ContactFolders(containers, selectors.PrefixMatch())) + sel.ContactFolders(containers, selectors.PrefixMatch()), + sel.EventCalendars(containers, selectors.PrefixMatch())) creds, err := acct.M365Config() require.NoError(t, err, clues.ToCore(err)) @@ -838,22 +838,18 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont container2: {}, }, }, - // TODO: not currently functioning; cannot retrieve generated calendars - // path.EventsCategory: { - // dbf: eventDBF, - // dests: map[string]contDeets{ - // container1: {}, - // container2: {}, - // }, - // }, + path.EventsCategory: { + dbf: eventDBF, + dests: map[string]contDeets{ + container1: {}, + container2: {}, + }, + }, } // populate initial test data for category, gen := range dataset { for destName := range gen.dests { - // TODO: the details.Builder returned by restore can contain entries with - // incorrect information. non-representative repo-refs and the like. Until - // that gets fixed, we can't consume that info for testing. deets := generateContainerOfItems( t, ctx, @@ -861,7 +857,10 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont service, category, selectors.NewExchangeRestore([]string{uidn.ID()}).Selector, - creds.AzureTenantID, uidn.ID(), "", destName, + creds.AzureTenantID, + uidn.ID(), + "", + destName, 2, version.Backup, gen.dbf) @@ -926,7 +925,12 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont } } - require.NotEmptyf(t, longestLR, "must find an expected details entry matching the generated folder: %s", destName) + require.NotEmptyf( + t, + longestLR, + "must find a details entry matching the generated %s container: %s", + category, + destName) cd.locRef = longestLR @@ -1274,8 +1278,9 @@ func testExchangeContinuousBackups(suite *BackupOpIntegrationSuite, toggles cont checkMetadataFilesExist(t, ctx, bupID, kw, ms, atid, uidn.ID(), service, categories) deeTD.CheckBackupDetails(t, ctx, bupID, whatSet, ms, ss, expectDeets, true) - // FIXME: commented tests are flaky due to interference with other tests - // we need to find a better way to make good assertions here. + // FIXME: commented tests are flaky due to delta calls retaining data that is + // out of scope of the test data. + // we need to find a better way to make isolated assertions here. // The addition of the deeTD package gives us enough coverage to comment // out the tests for now and look to their improvemeng later.