quick test for tags
This commit is contained in:
parent
30b86f664e
commit
dceb5f9506
@ -561,6 +561,15 @@ func (suite *BackupOpUnitSuite) TestBackupOperation_ConsumeBackupDataCollections
|
||||
ctx, flush := tester.NewContext()
|
||||
defer flush()
|
||||
|
||||
expectTags := map[string]string{
|
||||
"backup-id": "",
|
||||
"bob": "",
|
||||
"bobby": "",
|
||||
"exchangecontacts": "",
|
||||
"exchangeemail": "",
|
||||
"is-canon-backup": "",
|
||||
}
|
||||
|
||||
mbu := &mockBackupConsumer{
|
||||
checkFunc: func(
|
||||
bases []kopia.IncrementalBase,
|
||||
@ -568,16 +577,43 @@ func (suite *BackupOpUnitSuite) TestBackupOperation_ConsumeBackupDataCollections
|
||||
tags map[string]string,
|
||||
buildTreeWithBase bool,
|
||||
) {
|
||||
assert.Equal(t, expectTags, tags)
|
||||
assert.ElementsMatch(t, test.expected, bases)
|
||||
},
|
||||
}
|
||||
|
||||
reasons := []kopia.Reason{
|
||||
{
|
||||
ResourceOwner: "bob",
|
||||
Service: path.ExchangeService,
|
||||
Category: path.EmailCategory,
|
||||
},
|
||||
{
|
||||
ResourceOwner: "bobby",
|
||||
Service: path.ExchangeService,
|
||||
Category: path.EmailCategory,
|
||||
},
|
||||
}
|
||||
|
||||
fallbackReasons := []kopia.Reason{
|
||||
{
|
||||
ResourceOwner: "bob",
|
||||
Service: path.ExchangeService,
|
||||
Category: path.EmailCategory,
|
||||
},
|
||||
{
|
||||
ResourceOwner: "bob",
|
||||
Service: path.ExchangeService,
|
||||
Category: path.ContactsCategory,
|
||||
},
|
||||
}
|
||||
|
||||
//nolint:errcheck
|
||||
consumeBackupCollections(
|
||||
ctx,
|
||||
mbu,
|
||||
tenant,
|
||||
nil, nil,
|
||||
reasons, fallbackReasons,
|
||||
test.inputMan,
|
||||
nil,
|
||||
nil,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user