Improve datadog integration specs
Improve datadog integration specs to actually test if supported_events
are properly handled.
We have two suggestions on that MR thread, I think any of them is ok as a follow-up:
-
@alexkalderimis: A nicer test would be to trigger a build event and see that it is handled by datadog. That is a bit more involved, and ~"group::integrations" might want to handle that as a follow-up -
@felipe_artur: Yes, this is better, we are kind of doing this for#executeat https://gitlab.com/gitlab-org/gitlab/-/blob/master/spec/models/integrations/datadog_spec.rb#L213, it does not trigger a build but executes the service with possible event data. Another option would be to move those to a shared example and perform the same forasync_execute.
The following discussion from !104114 (merged) should be addressed:
-
@felipe_artur started a discussion: (+5 comments) This works fine, but what do you think about testing if
supported_eventsis correct atspec/models/integrations/datadog_spec.rbinstead?