Skip to content

Commit

Permalink
chore: register integration events in Datadog integration (#7635)
Browse files Browse the repository at this point in the history
https://linear.app/unleash/issue/2-2461/register-integration-events-datadog

Registers integration events in the **Datadog** integration.

Similar to:
 - #7634 
 - #7631
 - #7626
 - #7621
  • Loading branch information
nunogois authored Jul 22, 2024
1 parent e07ded9 commit 47ff73a
Show file tree
Hide file tree
Showing 3 changed files with 293 additions and 202 deletions.
18 changes: 9 additions & 9 deletions src/lib/addons/__snapshots__/datadog.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Should call datadog webhook for archived toggle 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project ** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for archived toggle 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project ** \\n %%% ","title":"Unleash notification update"}"`;

exports[`Should call datadog webhook for archived toggle with project info 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project *[some-project](http://some-url.com/projects/some-project)* \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for archived toggle with project info 1`] = `"{"text":"%%% \\n *[email protected]* archived *some-toggle* in project *[some-project](http://some-url.com/projects/some-project)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Should call datadog webhook 1`] = `"{"text":"%%% \\n *[email protected]* created *[some-toggle](http://some-url.com/projects//features/some-toggle)* in project ** \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook 1`] = `"{"text":"%%% \\n *[email protected]* created *[some-toggle](http://some-url.com/projects//features/some-toggle)* in project ** \\n %%% ","title":"Unleash notification update"}"`;

exports[`Should call datadog webhook for toggled environment 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook for toggled environment 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Should call datadog webhook with JSON when template set 1`] = `"{"text":"{\\n \\"event\\": \\"feature-created\\",\\n \\"createdBy\\": \\"some@user.com\\"\\n}","title":"Unleash notification update"}"`;
exports[`Datadog integration Should call datadog webhook with JSON when template set 1`] = `"{"text":"{\\n \\"event\\": \\"feature-created\\",\\n \\"createdBy\\": \\"some@user.com\\"\\n}","title":"Unleash notification update"}"`;

exports[`Should include customHeaders in headers when calling service 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;
exports[`Datadog integration Should include customHeaders in headers when calling service 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update"}"`;

exports[`Should include customHeaders in headers when calling service 2`] = `
exports[`Datadog integration Should include customHeaders in headers when calling service 2`] = `
{
"Content-Type": "application/json",
"DD-API-KEY": "fakeKey",
"MY_CUSTOM_HEADER": "MY_CUSTOM_VALUE",
}
`;

exports[`Should not include source_type_name when included in the config 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update","source_type_name":"my-custom-source-type"}"`;
exports[`Datadog integration Should not include source_type_name when included in the config 1`] = `"{"text":"%%% \\n *[email protected]* disabled *[some-toggle](http://some-url.com/projects/default/features/some-toggle)* for the *development* environment in project *[default](http://some-url.com/projects/default)* \\n %%% ","title":"Unleash notification update","source_type_name":"my-custom-source-type"}"`;

exports[`Should not include source_type_name when included in the config 2`] = `
exports[`Datadog integration Should not include source_type_name when included in the config 2`] = `
{
"Content-Type": "application/json",
"DD-API-KEY": "fakeKey",
Expand Down
Loading

0 comments on commit 47ff73a

Please sign in to comment.