CLI and selectors tests for folder prefix match (#1011)
## Description Specifying a folder on the CLI should cause the system to do a prefix match on that folder when doing a restore, backup details, or selector reduce operation. Recently updated behavior, adjusting tests to match new expectations. ## Type of change <!--- Please check the type of change your PR introduces: ---> - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Test - [ ] 💻 CI/Deployment - [ ] 🐹 Trivial/Minor ## Issue(s) * #913 ## Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual - [x] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
5e8b67a606
commit
dd7b84871f
7
src/cli/utils/testdata/opts.go
vendored
7
src/cli/utils/testdata/opts.go
vendored
@ -71,6 +71,13 @@ var (
|
||||
Emails: selectors.Any(),
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "EmailsFolderPrefixMatch",
|
||||
Expected: testdata.ExchangeEmailItems,
|
||||
Opts: utils.ExchangeOpts{
|
||||
EmailFolders: []string{testdata.ExchangeEmailInboxPath.Folder()},
|
||||
},
|
||||
},
|
||||
{
|
||||
Name: "EmailsBySubject",
|
||||
Expected: testdata.ExchangeEmailItems,
|
||||
|
||||
@ -44,6 +44,19 @@ func (suite *SelectorReduceSuite) TestReduce() {
|
||||
},
|
||||
expected: testdata.ExchangeEmailItems,
|
||||
},
|
||||
{
|
||||
name: "ExchangeMailFolderPrefixMatch",
|
||||
selFunc: func() selectors.Reducer {
|
||||
sel := selectors.NewExchangeRestore()
|
||||
sel.Include(sel.MailFolders(
|
||||
selectors.Any(),
|
||||
[]string{testdata.ExchangeEmailInboxPath.Folder()},
|
||||
))
|
||||
|
||||
return sel
|
||||
},
|
||||
expected: testdata.ExchangeEmailItems,
|
||||
},
|
||||
{
|
||||
name: "ExchangeMailSubject",
|
||||
selFunc: func() selectors.Reducer {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user