Scope restore CLI test (#592)
This commit is contained in:
parent
0ebf4d33e3
commit
f8bfe93261
@ -73,8 +73,7 @@ func (suite *BackupExchangeIntegrationSuite) SetupSuite() {
|
||||
|
||||
// restoration requires an existing backup
|
||||
sel := selectors.NewExchangeBackup()
|
||||
// TODO: only backup the inbox
|
||||
sel.Include(sel.Users([]string{suite.m365UserID}))
|
||||
sel.Include(sel.MailFolders([]string{suite.m365UserID}, []string{"Inbox"}))
|
||||
suite.backupOp, err = suite.repo.NewBackup(
|
||||
ctx,
|
||||
sel.Selector,
|
||||
|
||||
@ -140,7 +140,11 @@ func GetMailFolderID(service graph.Service, folderName, user string) (*string, e
|
||||
|
||||
response, err := GetAllFolderNamesForUser(service, user)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return nil, errors.Wrapf(
|
||||
err,
|
||||
"user %s M365 query: %s",
|
||||
user, support.ConnectorStackErrorTrace(err),
|
||||
)
|
||||
}
|
||||
|
||||
pageIterator, err := msgraphgocore.NewPageIterator(
|
||||
|
||||
@ -21,7 +21,6 @@ import (
|
||||
"github.com/alcionai/corso/internal/data"
|
||||
"github.com/alcionai/corso/pkg/account"
|
||||
"github.com/alcionai/corso/pkg/control"
|
||||
"github.com/alcionai/corso/pkg/logger"
|
||||
"github.com/alcionai/corso/pkg/selectors"
|
||||
)
|
||||
|
||||
@ -299,7 +298,6 @@ func (gc *GraphConnector) RestoreMessages(ctx context.Context, dcs []data.Collec
|
||||
go func(cos *support.ConnectorOperationStatus) {
|
||||
gc.statusCh <- cos
|
||||
}(status)
|
||||
logger.Ctx(ctx).Debug(gc.PrintableStatus())
|
||||
return errs
|
||||
}
|
||||
|
||||
|
||||
@ -16,6 +16,7 @@ import (
|
||||
"github.com/alcionai/corso/internal/stats"
|
||||
"github.com/alcionai/corso/pkg/account"
|
||||
"github.com/alcionai/corso/pkg/control"
|
||||
"github.com/alcionai/corso/pkg/logger"
|
||||
"github.com/alcionai/corso/pkg/selectors"
|
||||
"github.com/alcionai/corso/pkg/store"
|
||||
)
|
||||
@ -142,6 +143,7 @@ func (op *RestoreOperation) Run(ctx context.Context) (err error) {
|
||||
}
|
||||
opStats.started = true
|
||||
opStats.gc = gc.AwaitStatus()
|
||||
logger.Ctx(ctx).Debug(gc.PrintableStatus())
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user