-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Cases] Limit the number of attachments that can be added to a case simultaneously #161250
Conversation
Pinging @elastic/response-ops (Team:ResponseOps) |
Pinging @elastic/response-ops-cases (Feature:Cases) |
@@ -218,17 +210,6 @@ export default ({ getService }: FtrProviderContext): void => { | |||
}); | |||
}); | |||
|
|||
it('should bulk create 100 file attachments when there is another attachment type in the request', async () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you remember why we had the test in the first place?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not really 😄 @jonathan-buttner ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah so I think the file attachment code limits how many files can be attached to a case to 100, what this test was covering is that the code only counts file attachments and would ignore a different type of attachment when doing the counting.
Maybe we don't need it anymore if we're limiting the total attachments in a single request to 100 🤷♂️
I think we have some unit test coverage there too so we're probably ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Jonathan. It seems it is covered by the unit tests.
💚 Build Succeeded
Metrics [docs]Async chunks
Page load bundle
Unknown metric groupsESLint disabled line counts
Total ESLint disabled count
History
To update your PR or re-run it, just comment with: cc @adcoelho |
Connected to #146945
Summary
I tried to create the tests following what we discussed offline.
BulkCreateCommentRequestRt
inx-pack/plugins/cases/common/api/cases/comment/index.test.ts
BulkCreateCommentRequestRt
is used bybulkCreate
Checklist
Delete any items that are not applicable to this PR.