-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes: 15835 : Added tests covering EventSubscription. #16298
Fixes: 15835 : Added tests covering EventSubscription. #16298
Conversation
…d previous test cases.
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
Quality Gate passed for 'open-metadata-ingestion'Issues Measures |
@@ -0,0 +1,181 @@ | |||
package org.openmetadata.service.resources.events; |
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.
this is completely same as the WebhookCallbackResource , I think if there is nothing that's changing we can utilise the same class
@@ -466,6 +475,12 @@ public void afterAllTests() throws Exception { | |||
EventSubscriptionResourceTest alertResourceTest = new EventSubscriptionResourceTest(); | |||
alertResourceTest.validateWebhookEvents(); | |||
alertResourceTest.validateWebhookEntityEvents(entityType); | |||
|
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.
@Siddhanttimeline here I would suggest to enable the subscription tests randomly , and choose one of the publisher type to be setup only (random as well) , it does not make sense to run all three , it would increase the CI time significantly
return "slackTest"; | ||
} | ||
|
||
public String getEntityUrl(String prefix, String fqn, String additionalParams) { |
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.
what we should be doing here is , in the slack/msteams see if there is a way to add extra attributes, and set link attr , we don't need to replicate the entity url building logic here , use existing one , and check if the link received in those extra attr is same
@@ -3107,6 +3122,21 @@ protected EntityHistory getVersionList(UUID id, Map<String, String> authHeaders) | |||
return TestUtils.get(target, EntityHistory.class, authHeaders); | |||
} | |||
|
|||
protected ResultList<ChangeEvent> getChangeEvents( |
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.
why are we copying the same logic for getChangeEvents, utilise the below function no?
Take timestamp as arg, and only set it as query param when it is not null
Fixes : 15835
Type of change:
Checklist:
Fixes <issue-number>: <short explanation>