Revert "Issue 2022 eventincr" (#2256)
Reverts alcionai/corso#2167. This is causing the integration test to fail consistently (in CI and local runs)
This commit is contained in:
parent
ac73d874f9
commit
4a6959f60f
@ -643,7 +643,8 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
categories = map[path.CategoryType][]string{
|
||||
path.EmailCategory: exchange.MetadataFileNames(path.EmailCategory),
|
||||
path.ContactsCategory: exchange.MetadataFileNames(path.ContactsCategory),
|
||||
path.EventsCategory: exchange.MetadataFileNames(path.EventsCategory),
|
||||
// TODO: not currently functioning; cannot retrieve generated calendars
|
||||
// path.EventsCategory: exchange.MetadataFileNames(path.EventsCategory),
|
||||
}
|
||||
container1 = fmt.Sprintf("%s%d_%s", incrementalsDestContainerPrefix, 1, now)
|
||||
container2 = fmt.Sprintf("%s%d_%s", incrementalsDestContainerPrefix, 2, now)
|
||||
@ -714,13 +715,14 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
container2: {},
|
||||
},
|
||||
},
|
||||
path.EventsCategory: {
|
||||
dbf: eventDBF,
|
||||
dests: map[string]contDeets{
|
||||
container1: {},
|
||||
container2: {},
|
||||
},
|
||||
},
|
||||
// TODO: not currently functioning; cannot retrieve generated calendars
|
||||
// path.EventsCategory: {
|
||||
// dbf: eventDBF,
|
||||
// dests: map[string]contDeets{
|
||||
// container1: {},
|
||||
// container2: {},
|
||||
// },
|
||||
// },
|
||||
}
|
||||
|
||||
// populate initial test data
|
||||
@ -773,7 +775,6 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
sel.Include(
|
||||
sel.MailFolders(containers, selectors.PrefixMatch()),
|
||||
sel.ContactFolders(containers, selectors.PrefixMatch()),
|
||||
sel.EventCalendars(containers, selectors.PrefixMatch()),
|
||||
)
|
||||
|
||||
bo, _, kw, ms, closer := prepNewTestBackupOp(t, ctx, mb, sel.Selector, ffs)
|
||||
@ -882,8 +883,8 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
dataset[category].dests[container3] = contDeets{id, deets}
|
||||
}
|
||||
},
|
||||
itemsRead: 6, // two items per category
|
||||
itemsWritten: 6,
|
||||
itemsRead: 4,
|
||||
itemsWritten: 4,
|
||||
},
|
||||
{
|
||||
name: "rename a folder",
|
||||
@ -933,8 +934,8 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
}
|
||||
}
|
||||
},
|
||||
itemsRead: 2,
|
||||
itemsWritten: 8, // two items per category
|
||||
itemsRead: 0,
|
||||
itemsWritten: 4,
|
||||
},
|
||||
{
|
||||
name: "add a new item",
|
||||
@ -970,8 +971,8 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
}
|
||||
}
|
||||
},
|
||||
itemsRead: 3, // one item per category
|
||||
itemsWritten: 3,
|
||||
itemsRead: 2,
|
||||
itemsWritten: 2,
|
||||
},
|
||||
{
|
||||
name: "delete an existing item",
|
||||
@ -1002,12 +1003,12 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
require.NoError(t, err, "getting event ids")
|
||||
require.NotEmpty(t, ids, "event ids in folder")
|
||||
|
||||
err = cli.EventsById(ids[0]).Delete(ctx, nil)
|
||||
err = cli.CalendarsById(ids[0]).Delete(ctx, nil)
|
||||
require.NoError(t, err, "deleting calendar: %s", support.ConnectorStackErrorTrace(err))
|
||||
}
|
||||
}
|
||||
},
|
||||
itemsRead: 3, // one item per category
|
||||
itemsRead: 2,
|
||||
itemsWritten: 0, // deletes are not counted as "writes"
|
||||
},
|
||||
}
|
||||
@ -1034,9 +1035,9 @@ func (suite *BackupOpIntegrationSuite) TestBackup_Run_exchangeIncrementals() {
|
||||
)
|
||||
|
||||
// do some additional checks to ensure the incremental dealt with fewer items.
|
||||
// +6 on read/writes to account for metadata: 1 delta and 1 path for each type.
|
||||
assert.Equal(t, test.itemsWritten+6, incBO.Results.ItemsWritten, "incremental items written")
|
||||
assert.Equal(t, test.itemsRead+6, incBO.Results.ItemsRead, "incremental items read")
|
||||
// +4 on read/writes to account for metadata: 1 delta and 1 path for each type.
|
||||
assert.Equal(t, test.itemsWritten+4, incBO.Results.ItemsWritten, "incremental items written")
|
||||
assert.Equal(t, test.itemsRead+4, incBO.Results.ItemsRead, "incremental items read")
|
||||
assert.NoError(t, incBO.Results.ReadErrors, "incremental read errors")
|
||||
assert.NoError(t, incBO.Results.WriteErrors, "incremental write errors")
|
||||
assert.Equal(t, 1, incMB.TimesCalled[events.BackupStart], "incremental backup-start events")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user