Test variable rename (#4587)

Rename variable in test struct to be more in line
with other variable names and also make the use
clearer

---

#### 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
- [x]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-10-31 16:23:12 -07:00 committed by GitHub
parent 3e13471ac6
commit 29d4e5a328
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -382,7 +382,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
data []baseInfo data []baseInfo
// Use this to denote the Reasons a base backup or base manifest is // Use this to denote the Reasons a base backup or base manifest is
// selected. The int maps to the index of the backup or manifest in data. // selected. The int maps to the index of the backup or manifest in data.
expectedBaseReasons map[int][]identity.Reasoner expectedMergeReasons map[int][]identity.Reasoner
// Use this to denote the Reasons a kopia assised incrementals manifest is // Use this to denote the Reasons a kopia assised incrementals manifest is
// selected. The int maps to the index of the manifest in data. // selected. The int maps to the index of the manifest in data.
expectedAssistReasons map[int][]identity.Reasoner expectedAssistReasons map[int][]identity.Reasoner
@ -397,7 +397,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
1: testUser1Mail, 1: testUser1Mail,
}, },
}, },
@ -426,7 +426,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
1: testUser1Mail, 1: testUser1Mail,
}, },
}, },
@ -440,7 +440,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
1: testUser1Mail, 1: testUser1Mail,
}, },
}, },
@ -452,7 +452,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
legacyBackupDetails(). legacyBackupDetails().
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -463,7 +463,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testAllUsersAllCats...). newBaseInfoBuilder(1, testT1, testAllUsersAllCats...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testAllUsersAllCats, 0: testAllUsersAllCats,
}, },
}, },
@ -488,7 +488,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(2, testT2, testAllUsersMail...). newBaseInfoBuilder(2, testT2, testAllUsersMail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: { 0: {
newTestReason(testUser1, path.EventsCategory), newTestReason(testUser1, path.EventsCategory),
newTestReason(testUser2, path.EventsCategory), newTestReason(testUser2, path.EventsCategory),
@ -528,7 +528,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newTestReason(testUser2, path.EmailCategory)). newTestReason(testUser2, path.EmailCategory)).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
2: { 2: {
newTestReason(testUser1, path.EmailCategory), newTestReason(testUser1, path.EmailCategory),
newTestReason(testUser2, path.EmailCategory), newTestReason(testUser2, path.EmailCategory),
@ -558,7 +558,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
setSnapshotIncomplete("checkpoint"). setSnapshotIncomplete("checkpoint").
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -572,7 +572,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(2, testT2, testUser1Mail...). newBaseInfoBuilder(2, testT2, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
1: testUser1Mail, 1: testUser1Mail,
}, },
}, },
@ -595,7 +595,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -610,7 +610,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -629,7 +629,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
newBaseInfoBuilder(1, testT1, testUser1Mail...). newBaseInfoBuilder(1, testT1, testUser1Mail...).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
2: testUser1Mail, 2: testUser1Mail,
}, },
expectedAssistReasons: map[int][]identity.Reasoner{ expectedAssistReasons: map[int][]identity.Reasoner{
@ -646,7 +646,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
setBackupType(model.AssistBackup). setBackupType(model.AssistBackup).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -673,7 +673,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
setBackupType(model.MergeBackup). setBackupType(model.MergeBackup).
build(), build(),
}, },
expectedBaseReasons: map[int][]identity.Reasoner{ expectedMergeReasons: map[int][]identity.Reasoner{
0: testUser1Mail, 0: testUser1Mail,
}, },
}, },
@ -708,7 +708,7 @@ func (suite *BaseFinderUnitSuite) TestGetBases() {
t, t,
bb.MergeBases(), bb.MergeBases(),
test.data, test.data,
test.expectedBaseReasons) test.expectedMergeReasons)
checkBaseEntriesMatch( checkBaseEntriesMatch(
t, t,
bb.UniqueAssistBases(), bb.UniqueAssistBases(),