Skip to content
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

e2e send-email test scenarios #1637

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

muminmmd
Copy link

@google-cla
Copy link

google-cla bot commented May 18, 2022

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

For more information, open the CLA check for this pull request.

Copy link
Contributor

@rmstar rmstar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • How are we verifying that email gets sent successfully?
  • What happens if email is not sent successfully? Is there an error?

sendEmailInvalidRecipients=incorrectrecp
sendEmailMessage=test case
[email protected]
sendEmailPassword=dummyPassword
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we shouldn't store passwords in plaintext

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Password updated in Environment variables.

private static boolean firstFileSinkTestFlag = true;

@Before(order = 1, value = "@FILE_SOURCE_TEST")
public static void setFileSourceAbsolutePath() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using file source plugin in these tests? If not, please remove irrelevant code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we are using file source plugin.

@muminmmd
Copy link
Author

  • How are we verifying that email gets sent successfully?
  • What happens if email is not sent successfully? Is there an error?
  • We are going to validate it from the pipeline logs. Bug has been raised as currently it is not getting logged in pipeline logs.
  • Test scenario updated, when email is not sent successfully.

And Wait till pipeline is in running state
And Open and capture logs
And Verify the pipeline status is "Succeeded"
#And Verify email sent message in logs (Implement this step once PLUGIN-1255 is fixed.)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's expected that we would log a message when email is sent successfully.
A RuntimeException is thrown in the failure case - does this show up in the pipeline logs when there is an error in sending email? https://github.com/cdapio/hydrator-plugins/blob/develop/core-plugins/src/main/java/io/cdap/plugin/batch/action/EmailAction.java#L154

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants