Handle groups when setting currency middleware defaults (#4190)

<!-- 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
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 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-07 13:37:07 +05:30 committed by GitHub
parent eb8f3131f9
commit 755db5ae92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -122,7 +122,8 @@ func ctxLimiter(ctx context.Context) *rate.Limiter {
}
switch lc.Service {
case path.OneDriveService, path.SharePointService:
// FIXME: Handle based on category once we add chat backup
case path.OneDriveService, path.SharePointService, path.GroupsService:
return driveLimiter
default:
return defaultLimiter

View File

@ -372,6 +372,11 @@ func (suite *MiddlewareUnitSuite) TestBindExtractLimiterConfig() {
service: path.SharePointService,
expectLimiter: driveLimiter,
},
{
name: "groups",
service: path.GroupsService,
expectLimiter: driveLimiter,
},
{
name: "unknownService",
service: path.UnknownService,