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:
ashmrtn 2023-11-10 18:55:05 -08:00 committed by GitHub
parent ffd7c2a2ee
commit 73112f695b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 529 additions and 461 deletions

View File

@ -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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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() {
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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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 {
tester.Suite
its intgTesterSetup

View File

@ -80,125 +80,6 @@ func (suite *GroupsBackupIntgSuite) TestBackup_Run_incrementalGroups() {
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() {
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 {
tester.Suite
its intgTesterSetup

View File

@ -111,122 +111,6 @@ func (suite *OneDriveBackupIntgSuite) TestBackup_Run_oneDrive() {
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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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() {
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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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 {
tester.Suite
its intgTesterSetup

View File

@ -46,121 +46,6 @@ func (suite *SharePointBackupIntgSuite) SetupSuite() {
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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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() {
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, &notForcedFull, mb, false)
checkBackupIsInManifests(
t,
ctx,
bod.kw,
bod.sw,
&notForcedFull,
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 {
tester.Suite
its intgTesterSetup