-
Notifications
You must be signed in to change notification settings - Fork 0
test: ittest build #1
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
base: master
Are you sure you want to change the base?
Conversation
dmitry-fa
left a comment
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.
Looks good
5e4510e to
2f4766c
Compare
|
|
||
| @Test | ||
| public void getWorkflowTest() { | ||
| WorkflowName name2 = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); |
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.
Use actual value of PROJECT, LOCATION and WORKFLOW
| .build(); | ||
| mockWorkflows.addResponse(expectedResponse); | ||
|
|
||
| WorkflowName name = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]"); |
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.
same here
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.
Its an ITTest so we need to do the actual api call with actual parameters because this look like unit test
| public void testListWorkflows() { | ||
| ListWorkflowsRequest request = ListWorkflowsRequest.newBuilder().setParent(PARENT).build(); | ||
| for (Workflow actualWorkflow : client.listWorkflows(request).iterateAll()) { | ||
| assertEquals(WORKFLOW_NAME, actualWorkflow.getName()); |
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.
nit : this checks will failed in case of system already has workflow
better to put check here with workflowname like:
for (Workflow actualWorkflow : client.listWorkflows(request).iterateAll()) {
if(WORKFLOW_NAME.equals(actualWorkflow.getName()){
assertEquals(WORKFLOW_NAME, actualWorkflow.getName());
assertEquals(expectedWorkflow, actualWorkflow);
}
}
athakor
left a comment
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.
LGTM
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> ☕️