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:
parent
eb8f3131f9
commit
755db5ae92
@ -122,7 +122,8 @@ func ctxLimiter(ctx context.Context) *rate.Limiter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch lc.Service {
|
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
|
return driveLimiter
|
||||||
default:
|
default:
|
||||||
return defaultLimiter
|
return defaultLimiter
|
||||||
|
|||||||
@ -372,6 +372,11 @@ func (suite *MiddlewareUnitSuite) TestBindExtractLimiterConfig() {
|
|||||||
service: path.SharePointService,
|
service: path.SharePointService,
|
||||||
expectLimiter: driveLimiter,
|
expectLimiter: driveLimiter,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "groups",
|
||||||
|
service: path.GroupsService,
|
||||||
|
expectLimiter: driveLimiter,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "unknownService",
|
name: "unknownService",
|
||||||
service: path.UnknownService,
|
service: path.UnknownService,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user