Add sites to metadata path (#4169)

This makes the following change to the metadata path:

```diff
-tenant/groupsMetadata/resourceOwner/libraries
+tenant/groupsMetadata/resourceOwner/libraries/sites/site-id
```

The change only affect groups and no other services.
<!-- PR description-->

---

#### 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

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [x] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-09-06 12:41:37 +05:30 committed by GitHub
parent 86e1cef3a9
commit 2d590048a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -63,6 +63,11 @@ func (h groupBackupHandler) MetadataPathPrefix(tenantID string) (path.Path, erro
return nil, clues.Wrap(err, "making metadata path")
}
p, err = p.Append(false, odConsts.SitesPathDir, h.siteID)
if err != nil {
return nil, clues.Wrap(err, "appending sites to metadata path")
}
return p, nil
}

View File

@ -59,7 +59,7 @@ func (suite *GroupBackupHandlerUnitSuite) TestMetadataPathPrefix() {
}{
{
name: "group",
expect: "tenant/groupsMetadata/resourceOwner/libraries",
expect: "tenant/groupsMetadata/resourceOwner/libraries/sites/site-id",
expectErr: assert.NoError,
},
}