Move groups version bump tests to nightly (#4659)
Make version bump regression tests nightly tests instead of running on every push. Just code lift'n'shift with no logic changes. --- #### Does this PR need a docs update or release note? - [ ] ✅ Yes, it's included - [ ] 🕐 Yes, but in a later PR - [x] ⛔ No #### Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Supportability/Tests - [ ] 💻 CI/Deployment - [ ] 🧹 Tech Debt/Cleanup #### Test Plan - [ ] 💪 Manual - [ ] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
ffd7c2a2ee
commit
73112f695b
@ -233,117 +233,6 @@ func (suite *ExchangeBackupIntgSuite) TestBackup_Run_exchange() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *ExchangeBackupIntgSuite) TestBackup_Run_exchangeBasic_groups9VersionBump() {
|
|
||||||
t := suite.T()
|
|
||||||
|
|
||||||
ctx, flush := tester.NewContext(t)
|
|
||||||
defer flush()
|
|
||||||
|
|
||||||
var (
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
sel = selectors.NewExchangeBackup([]string{suite.its.user.ID})
|
|
||||||
opts = control.DefaultOptions()
|
|
||||||
ws = deeTD.DriveIDFromRepoRef
|
|
||||||
)
|
|
||||||
|
|
||||||
sel.Include(
|
|
||||||
sel.ContactFolders([]string{api.DefaultContacts}, selectors.PrefixMatch()),
|
|
||||||
// sel.EventCalendars([]string{api.DefaultCalendar}, selectors.PrefixMatch()),
|
|
||||||
sel.MailFolders([]string{api.MailInbox}, selectors.PrefixMatch()))
|
|
||||||
|
|
||||||
bo, bod := prepNewTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
mb,
|
|
||||||
sel.Selector,
|
|
||||||
opts,
|
|
||||||
version.All8MigrateUserPNToID,
|
|
||||||
counter)
|
|
||||||
defer bod.close(t, ctx)
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, &bo, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
&bo,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.EmailCategory)
|
|
||||||
|
|
||||||
_, expectDeets := deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.ExchangeService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
notForcedFull := newTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod,
|
|
||||||
mb,
|
|
||||||
opts,
|
|
||||||
counter)
|
|
||||||
notForcedFull.BackupVersion = version.Groups9Update
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
¬ForcedFull,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.EmailCategory)
|
|
||||||
|
|
||||||
_, expectDeets = deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.ExchangeService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
// The number of items backed up in the second backup should be less than the
|
|
||||||
// number of items in the original backup.
|
|
||||||
assert.Greater(
|
|
||||||
t,
|
|
||||||
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
"items written")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (suite *ExchangeBackupIntgSuite) TestBackup_Run_incrementalExchange() {
|
func (suite *ExchangeBackupIntgSuite) TestBackup_Run_incrementalExchange() {
|
||||||
testExchangeContinuousBackups(suite, control.Toggles{})
|
testExchangeContinuousBackups(suite, control.Toggles{})
|
||||||
}
|
}
|
||||||
@ -998,6 +887,134 @@ func testExchangeContinuousBackups(suite *ExchangeBackupIntgSuite, toggles contr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type ExchangeBackupNightlyIntgSuite struct {
|
||||||
|
tester.Suite
|
||||||
|
its intgTesterSetup
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestExchangeBackupNightlyIntgSuite(t *testing.T) {
|
||||||
|
suite.Run(t, &ExchangeBackupNightlyIntgSuite{
|
||||||
|
Suite: tester.NewNightlySuite(
|
||||||
|
t,
|
||||||
|
[][]string{tconfig.M365AcctCredEnvs, storeTD.AWSStorageCredEnvs}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *ExchangeBackupNightlyIntgSuite) SetupSuite() {
|
||||||
|
suite.its = newIntegrationTesterSetup(suite.T())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *ExchangeBackupNightlyIntgSuite) TestBackup_Run_exchangeBasic_groups9VersionBump() {
|
||||||
|
t := suite.T()
|
||||||
|
|
||||||
|
ctx, flush := tester.NewContext(t)
|
||||||
|
defer flush()
|
||||||
|
|
||||||
|
var (
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
sel = selectors.NewExchangeBackup([]string{suite.its.user.ID})
|
||||||
|
opts = control.DefaultOptions()
|
||||||
|
ws = deeTD.DriveIDFromRepoRef
|
||||||
|
)
|
||||||
|
|
||||||
|
sel.Include(
|
||||||
|
sel.ContactFolders([]string{api.DefaultContacts}, selectors.PrefixMatch()),
|
||||||
|
// sel.EventCalendars([]string{api.DefaultCalendar}, selectors.PrefixMatch()),
|
||||||
|
sel.MailFolders([]string{api.MailInbox}, selectors.PrefixMatch()))
|
||||||
|
|
||||||
|
bo, bod := prepNewTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
mb,
|
||||||
|
sel.Selector,
|
||||||
|
opts,
|
||||||
|
version.All8MigrateUserPNToID,
|
||||||
|
counter)
|
||||||
|
defer bod.close(t, ctx)
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, &bo, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
&bo,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.EmailCategory)
|
||||||
|
|
||||||
|
_, expectDeets := deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.ExchangeService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
notForcedFull := newTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod,
|
||||||
|
mb,
|
||||||
|
opts,
|
||||||
|
counter)
|
||||||
|
notForcedFull.BackupVersion = version.Groups9Update
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
¬ForcedFull,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.EmailCategory)
|
||||||
|
|
||||||
|
_, expectDeets = deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.ExchangeService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
// The number of items backed up in the second backup should be less than the
|
||||||
|
// number of items in the original backup.
|
||||||
|
assert.Greater(
|
||||||
|
t,
|
||||||
|
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
"items written")
|
||||||
|
}
|
||||||
|
|
||||||
type ExchangeRestoreNightlyIntgSuite struct {
|
type ExchangeRestoreNightlyIntgSuite struct {
|
||||||
tester.Suite
|
tester.Suite
|
||||||
its intgTesterSetup
|
its intgTesterSetup
|
||||||
|
|||||||
@ -80,125 +80,6 @@ func (suite *GroupsBackupIntgSuite) TestBackup_Run_incrementalGroups() {
|
|||||||
true)
|
true)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *GroupsBackupIntgSuite) TestBackup_Run_groupsBasic_groups9VersionBump() {
|
|
||||||
t := suite.T()
|
|
||||||
|
|
||||||
ctx, flush := tester.NewContext(t)
|
|
||||||
defer flush()
|
|
||||||
|
|
||||||
var (
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
sel = selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
|
||||||
opts = control.DefaultOptions()
|
|
||||||
whatSet = deeTD.CategoryFromRepoRef
|
|
||||||
)
|
|
||||||
|
|
||||||
sel.Include(
|
|
||||||
selTD.GroupsBackupLibraryFolderScope(sel),
|
|
||||||
selTD.GroupsBackupChannelScope(sel))
|
|
||||||
|
|
||||||
bo, bod := prepNewTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
mb,
|
|
||||||
sel.Selector,
|
|
||||||
opts,
|
|
||||||
version.All8MigrateUserPNToID,
|
|
||||||
counter)
|
|
||||||
defer bod.close(t, ctx)
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, &bo, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
&bo,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.ChannelMessagesCategory)
|
|
||||||
|
|
||||||
_, expectDeets := deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.GroupsService,
|
|
||||||
whatSet,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
whatSet,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
forcedFull := newTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod,
|
|
||||||
mb,
|
|
||||||
opts,
|
|
||||||
counter)
|
|
||||||
forcedFull.BackupVersion = version.Groups9Update
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, &forcedFull, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
&forcedFull,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.ChannelMessagesCategory)
|
|
||||||
|
|
||||||
_, expectDeets = deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
forcedFull.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.GroupsService,
|
|
||||||
whatSet,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
forcedFull.Results.BackupID,
|
|
||||||
whatSet,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
// The number of items backed up in the forced full backup should be roughly
|
|
||||||
// the same as the number of items in the original backup.
|
|
||||||
assert.Equal(
|
|
||||||
t,
|
|
||||||
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
forcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
"items written")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (suite *GroupsBackupIntgSuite) TestBackup_Run_groupsVersion9AssistBases() {
|
|
||||||
sel := selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
|
||||||
sel.Include(
|
|
||||||
selTD.GroupsBackupLibraryFolderScope(sel),
|
|
||||||
selTD.GroupsBackupChannelScope(sel))
|
|
||||||
|
|
||||||
runDriveAssistBaseGroupsUpdate(suite, sel.Selector, false)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (suite *GroupsBackupIntgSuite) TestBackup_Run_groupsBasic() {
|
func (suite *GroupsBackupIntgSuite) TestBackup_Run_groupsBasic() {
|
||||||
t := suite.T()
|
t := suite.T()
|
||||||
|
|
||||||
@ -317,6 +198,142 @@ func (suite *GroupsBackupIntgSuite) TestBackup_Run_groupsExtensions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type GroupsBackupNightlyIntgSuite struct {
|
||||||
|
tester.Suite
|
||||||
|
its intgTesterSetup
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGroupsBackupNightlyIntgSuite(t *testing.T) {
|
||||||
|
suite.Run(t, &GroupsBackupNightlyIntgSuite{
|
||||||
|
Suite: tester.NewNightlySuite(
|
||||||
|
t,
|
||||||
|
[][]string{tconfig.M365AcctCredEnvs, storeTD.AWSStorageCredEnvs}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *GroupsBackupNightlyIntgSuite) SetupSuite() {
|
||||||
|
suite.its = newIntegrationTesterSetup(suite.T())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *GroupsBackupNightlyIntgSuite) TestBackup_Run_groupsBasic_groups9VersionBump() {
|
||||||
|
t := suite.T()
|
||||||
|
|
||||||
|
ctx, flush := tester.NewContext(t)
|
||||||
|
defer flush()
|
||||||
|
|
||||||
|
var (
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
sel = selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
||||||
|
opts = control.DefaultOptions()
|
||||||
|
whatSet = deeTD.CategoryFromRepoRef
|
||||||
|
)
|
||||||
|
|
||||||
|
sel.Include(
|
||||||
|
selTD.GroupsBackupLibraryFolderScope(sel),
|
||||||
|
selTD.GroupsBackupChannelScope(sel))
|
||||||
|
|
||||||
|
bo, bod := prepNewTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
mb,
|
||||||
|
sel.Selector,
|
||||||
|
opts,
|
||||||
|
version.All8MigrateUserPNToID,
|
||||||
|
counter)
|
||||||
|
defer bod.close(t, ctx)
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, &bo, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
&bo,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.ChannelMessagesCategory)
|
||||||
|
|
||||||
|
_, expectDeets := deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.GroupsService,
|
||||||
|
whatSet,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
whatSet,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
forcedFull := newTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod,
|
||||||
|
mb,
|
||||||
|
opts,
|
||||||
|
counter)
|
||||||
|
forcedFull.BackupVersion = version.Groups9Update
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, &forcedFull, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
&forcedFull,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.ChannelMessagesCategory)
|
||||||
|
|
||||||
|
_, expectDeets = deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
forcedFull.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.GroupsService,
|
||||||
|
whatSet,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
forcedFull.Results.BackupID,
|
||||||
|
whatSet,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
// The number of items backed up in the forced full backup should be roughly
|
||||||
|
// the same as the number of items in the original backup.
|
||||||
|
assert.Equal(
|
||||||
|
t,
|
||||||
|
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
forcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
"items written")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *GroupsBackupNightlyIntgSuite) TestBackup_Run_groupsVersion9AssistBases() {
|
||||||
|
sel := selectors.NewGroupsBackup([]string{suite.its.group.ID})
|
||||||
|
sel.Include(
|
||||||
|
selTD.GroupsBackupLibraryFolderScope(sel),
|
||||||
|
selTD.GroupsBackupChannelScope(sel))
|
||||||
|
|
||||||
|
runDriveAssistBaseGroupsUpdate(suite, sel.Selector, false)
|
||||||
|
}
|
||||||
|
|
||||||
type GroupsRestoreNightlyIntgSuite struct {
|
type GroupsRestoreNightlyIntgSuite struct {
|
||||||
tester.Suite
|
tester.Suite
|
||||||
its intgTesterSetup
|
its intgTesterSetup
|
||||||
|
|||||||
@ -111,122 +111,6 @@ func (suite *OneDriveBackupIntgSuite) TestBackup_Run_oneDrive() {
|
|||||||
false)
|
false)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *OneDriveBackupIntgSuite) TestBackup_Run_oneDriveBasic_groups9VersionBump() {
|
|
||||||
t := suite.T()
|
|
||||||
|
|
||||||
ctx, flush := tester.NewContext(t)
|
|
||||||
defer flush()
|
|
||||||
|
|
||||||
var (
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
userID = tconfig.SecondaryM365UserID(t)
|
|
||||||
osel = selectors.NewOneDriveBackup([]string{userID})
|
|
||||||
ws = deeTD.DriveIDFromRepoRef
|
|
||||||
opts = control.DefaultOptions()
|
|
||||||
)
|
|
||||||
|
|
||||||
osel.Include(selTD.OneDriveBackupFolderScope(osel))
|
|
||||||
|
|
||||||
bo, bod := prepNewTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
mb,
|
|
||||||
osel.Selector,
|
|
||||||
opts,
|
|
||||||
version.All8MigrateUserPNToID,
|
|
||||||
counter)
|
|
||||||
defer bod.close(t, ctx)
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, &bo, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
&bo,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.FilesCategory)
|
|
||||||
|
|
||||||
_, expectDeets := deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.OneDriveService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
notForcedFull := newTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod,
|
|
||||||
mb,
|
|
||||||
opts,
|
|
||||||
counter)
|
|
||||||
notForcedFull.BackupVersion = version.Groups9Update
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
¬ForcedFull,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.FilesCategory)
|
|
||||||
|
|
||||||
_, expectDeets = deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.OneDriveService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
// The number of items backed up in the second backup should be less than the
|
|
||||||
// number of items in the original backup.
|
|
||||||
assert.Greater(
|
|
||||||
t,
|
|
||||||
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
"items written")
|
|
||||||
}
|
|
||||||
|
|
||||||
//func (suite *OneDriveBackupIntgSuite) TestBackup_Run_oneDriveVersion9AssistBases() {
|
|
||||||
// sel := selectors.NewOneDriveBackup([]string{tconfig.SecondaryM365UserID(suite.T())})
|
|
||||||
// sel.Include(selTD.OneDriveBackupFolderScope(sel))
|
|
||||||
//
|
|
||||||
// runDriveAssistBaseGroupsUpdate(suite, sel.Selector, true)
|
|
||||||
//}
|
|
||||||
|
|
||||||
func (suite *OneDriveBackupIntgSuite) TestBackup_Run_incrementalOneDrive() {
|
func (suite *OneDriveBackupIntgSuite) TestBackup_Run_incrementalOneDrive() {
|
||||||
sel := selectors.NewOneDriveRestore([]string{suite.its.user.ID})
|
sel := selectors.NewOneDriveRestore([]string{suite.its.user.ID})
|
||||||
|
|
||||||
@ -1299,6 +1183,139 @@ func (suite *OneDriveBackupIntgSuite) TestBackup_Run_oneDriveExtensions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type OneDriveBackupNightlyIntgSuite struct {
|
||||||
|
tester.Suite
|
||||||
|
its intgTesterSetup
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestOneDriveBackupNightlyIntgSuite(t *testing.T) {
|
||||||
|
suite.Run(t, &OneDriveBackupIntgSuite{
|
||||||
|
Suite: tester.NewNightlySuite(
|
||||||
|
t,
|
||||||
|
[][]string{tconfig.M365AcctCredEnvs, storeTD.AWSStorageCredEnvs}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *OneDriveBackupNightlyIntgSuite) SetupSuite() {
|
||||||
|
suite.its = newIntegrationTesterSetup(suite.T())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *OneDriveBackupNightlyIntgSuite) TestBackup_Run_oneDriveBasic_groups9VersionBump() {
|
||||||
|
t := suite.T()
|
||||||
|
|
||||||
|
ctx, flush := tester.NewContext(t)
|
||||||
|
defer flush()
|
||||||
|
|
||||||
|
var (
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
userID = tconfig.SecondaryM365UserID(t)
|
||||||
|
osel = selectors.NewOneDriveBackup([]string{userID})
|
||||||
|
ws = deeTD.DriveIDFromRepoRef
|
||||||
|
opts = control.DefaultOptions()
|
||||||
|
)
|
||||||
|
|
||||||
|
osel.Include(selTD.OneDriveBackupFolderScope(osel))
|
||||||
|
|
||||||
|
bo, bod := prepNewTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
mb,
|
||||||
|
osel.Selector,
|
||||||
|
opts,
|
||||||
|
version.All8MigrateUserPNToID,
|
||||||
|
counter)
|
||||||
|
defer bod.close(t, ctx)
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, &bo, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
&bo,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.FilesCategory)
|
||||||
|
|
||||||
|
_, expectDeets := deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.OneDriveService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
notForcedFull := newTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod,
|
||||||
|
mb,
|
||||||
|
opts,
|
||||||
|
counter)
|
||||||
|
notForcedFull.BackupVersion = version.Groups9Update
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
¬ForcedFull,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.FilesCategory)
|
||||||
|
|
||||||
|
_, expectDeets = deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.OneDriveService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
// The number of items backed up in the second backup should be less than the
|
||||||
|
// number of items in the original backup.
|
||||||
|
assert.Greater(
|
||||||
|
t,
|
||||||
|
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
"items written")
|
||||||
|
}
|
||||||
|
|
||||||
|
//func (suite *OneDriveBackupNightlyIntgSuite) TestBackup_Run_oneDriveVersion9AssistBases() {
|
||||||
|
// sel := selectors.NewOneDriveBackup([]string{tconfig.SecondaryM365UserID(suite.T())})
|
||||||
|
// sel.Include(selTD.OneDriveBackupFolderScope(sel))
|
||||||
|
//
|
||||||
|
// runDriveAssistBaseGroupsUpdate(suite, sel.Selector, true)
|
||||||
|
//}
|
||||||
|
|
||||||
type OneDriveRestoreNightlyIntgSuite struct {
|
type OneDriveRestoreNightlyIntgSuite struct {
|
||||||
tester.Suite
|
tester.Suite
|
||||||
its intgTesterSetup
|
its intgTesterSetup
|
||||||
|
|||||||
@ -46,121 +46,6 @@ func (suite *SharePointBackupIntgSuite) SetupSuite() {
|
|||||||
suite.its = newIntegrationTesterSetup(suite.T())
|
suite.its = newIntegrationTesterSetup(suite.T())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (suite *SharePointBackupIntgSuite) TestBackup_Run_sharePointBasic_groups9VersionBump() {
|
|
||||||
t := suite.T()
|
|
||||||
|
|
||||||
ctx, flush := tester.NewContext(t)
|
|
||||||
defer flush()
|
|
||||||
|
|
||||||
var (
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
sel = selectors.NewSharePointBackup([]string{suite.its.site.ID})
|
|
||||||
opts = control.DefaultOptions()
|
|
||||||
ws = deeTD.DriveIDFromRepoRef
|
|
||||||
)
|
|
||||||
|
|
||||||
sel.Include(selTD.SharePointBackupFolderScope(sel))
|
|
||||||
|
|
||||||
bo, bod := prepNewTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
mb,
|
|
||||||
sel.Selector,
|
|
||||||
opts,
|
|
||||||
version.All8MigrateUserPNToID,
|
|
||||||
counter)
|
|
||||||
defer bod.close(t, ctx)
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, &bo, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
&bo,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.LibrariesCategory)
|
|
||||||
|
|
||||||
_, expectDeets := deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.SharePointService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bo.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
mb = evmock.NewBus()
|
|
||||||
counter = count.New()
|
|
||||||
notForcedFull := newTestBackupOp(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod,
|
|
||||||
mb,
|
|
||||||
opts,
|
|
||||||
counter)
|
|
||||||
notForcedFull.BackupVersion = version.Groups9Update
|
|
||||||
|
|
||||||
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
|
||||||
checkBackupIsInManifests(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
bod.kw,
|
|
||||||
bod.sw,
|
|
||||||
¬ForcedFull,
|
|
||||||
bod.sel,
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.LibrariesCategory)
|
|
||||||
|
|
||||||
_, expectDeets = deeTD.GetDeetsInBackup(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
bod.acct.ID(),
|
|
||||||
bod.sel.ID(),
|
|
||||||
path.SharePointService,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss)
|
|
||||||
deeTD.CheckBackupDetails(
|
|
||||||
t,
|
|
||||||
ctx,
|
|
||||||
notForcedFull.Results.BackupID,
|
|
||||||
ws,
|
|
||||||
bod.kms,
|
|
||||||
bod.sss,
|
|
||||||
expectDeets,
|
|
||||||
false)
|
|
||||||
|
|
||||||
// The number of items backed up in the second backup should be less than the
|
|
||||||
// number of items in the original backup.
|
|
||||||
assert.Greater(
|
|
||||||
t,
|
|
||||||
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
|
||||||
"items written")
|
|
||||||
}
|
|
||||||
|
|
||||||
func (suite *SharePointBackupIntgSuite) TestBackup_Run_sharePointVersion9AssistBases() {
|
|
||||||
sel := selectors.NewSharePointBackup([]string{suite.its.site.ID})
|
|
||||||
sel.Include(selTD.SharePointBackupFolderScope(sel))
|
|
||||||
|
|
||||||
runDriveAssistBaseGroupsUpdate(suite, sel.Selector, true)
|
|
||||||
}
|
|
||||||
|
|
||||||
func (suite *SharePointBackupIntgSuite) TestBackup_Run_incrementalSharePoint() {
|
func (suite *SharePointBackupIntgSuite) TestBackup_Run_incrementalSharePoint() {
|
||||||
sel := selectors.NewSharePointRestore([]string{suite.its.site.ID})
|
sel := selectors.NewSharePointRestore([]string{suite.its.site.ID})
|
||||||
|
|
||||||
@ -298,6 +183,138 @@ func (suite *SharePointBackupIntgSuite) TestBackup_Run_sharePointExtensions() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type SharePointBackupNightlyIntgSuite struct {
|
||||||
|
tester.Suite
|
||||||
|
its intgTesterSetup
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestSharePointBackupNightlyIntgSuite(t *testing.T) {
|
||||||
|
suite.Run(t, &SharePointBackupNightlyIntgSuite{
|
||||||
|
Suite: tester.NewNightlySuite(
|
||||||
|
t,
|
||||||
|
[][]string{tconfig.M365AcctCredEnvs, storeTD.AWSStorageCredEnvs}),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *SharePointBackupNightlyIntgSuite) SetupSuite() {
|
||||||
|
suite.its = newIntegrationTesterSetup(suite.T())
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *SharePointBackupNightlyIntgSuite) TestBackup_Run_sharePointBasic_groups9VersionBump() {
|
||||||
|
t := suite.T()
|
||||||
|
|
||||||
|
ctx, flush := tester.NewContext(t)
|
||||||
|
defer flush()
|
||||||
|
|
||||||
|
var (
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
sel = selectors.NewSharePointBackup([]string{suite.its.site.ID})
|
||||||
|
opts = control.DefaultOptions()
|
||||||
|
ws = deeTD.DriveIDFromRepoRef
|
||||||
|
)
|
||||||
|
|
||||||
|
sel.Include(selTD.SharePointBackupFolderScope(sel))
|
||||||
|
|
||||||
|
bo, bod := prepNewTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
mb,
|
||||||
|
sel.Selector,
|
||||||
|
opts,
|
||||||
|
version.All8MigrateUserPNToID,
|
||||||
|
counter)
|
||||||
|
defer bod.close(t, ctx)
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, &bo, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
&bo,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.LibrariesCategory)
|
||||||
|
|
||||||
|
_, expectDeets := deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.SharePointService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bo.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
mb = evmock.NewBus()
|
||||||
|
counter = count.New()
|
||||||
|
notForcedFull := newTestBackupOp(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod,
|
||||||
|
mb,
|
||||||
|
opts,
|
||||||
|
counter)
|
||||||
|
notForcedFull.BackupVersion = version.Groups9Update
|
||||||
|
|
||||||
|
runAndCheckBackup(t, ctx, ¬ForcedFull, mb, false)
|
||||||
|
checkBackupIsInManifests(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
bod.kw,
|
||||||
|
bod.sw,
|
||||||
|
¬ForcedFull,
|
||||||
|
bod.sel,
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.LibrariesCategory)
|
||||||
|
|
||||||
|
_, expectDeets = deeTD.GetDeetsInBackup(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
bod.acct.ID(),
|
||||||
|
bod.sel.ID(),
|
||||||
|
path.SharePointService,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss)
|
||||||
|
deeTD.CheckBackupDetails(
|
||||||
|
t,
|
||||||
|
ctx,
|
||||||
|
notForcedFull.Results.BackupID,
|
||||||
|
ws,
|
||||||
|
bod.kms,
|
||||||
|
bod.sss,
|
||||||
|
expectDeets,
|
||||||
|
false)
|
||||||
|
|
||||||
|
// The number of items backed up in the second backup should be less than the
|
||||||
|
// number of items in the original backup.
|
||||||
|
assert.Greater(
|
||||||
|
t,
|
||||||
|
bo.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
notForcedFull.Results.Counts[string(count.PersistedNonCachedFiles)],
|
||||||
|
"items written")
|
||||||
|
}
|
||||||
|
|
||||||
|
func (suite *SharePointBackupNightlyIntgSuite) TestBackup_Run_sharePointVersion9AssistBases() {
|
||||||
|
sel := selectors.NewSharePointBackup([]string{suite.its.site.ID})
|
||||||
|
sel.Include(selTD.SharePointBackupFolderScope(sel))
|
||||||
|
|
||||||
|
runDriveAssistBaseGroupsUpdate(suite, sel.Selector, true)
|
||||||
|
}
|
||||||
|
|
||||||
type SharePointRestoreNightlyIntgSuite struct {
|
type SharePointRestoreNightlyIntgSuite struct {
|
||||||
tester.Suite
|
tester.Suite
|
||||||
its intgTesterSetup
|
its intgTesterSetup
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user