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