Skip to content

Conversation

@twinkle-kadia
Copy link
Owner

@twinkle-kadia twinkle-kadia commented Sep 21, 2020

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:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> ☕️

Copy link

@dmitry-fa dmitry-fa left a comment

Choose a reason for hiding this comment

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

Looks good


@Test
public void getWorkflowTest() {
WorkflowName name2 = WorkflowName.of("[PROJECT]", "[LOCATION]", "[WORKFLOW]");
Copy link

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]");
Copy link

Choose a reason for hiding this comment

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

same here

Copy link

@athakor athakor left a 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());
Copy link

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);
    }
}

Copy link

@athakor athakor left a comment

Choose a reason for hiding this comment

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

LGTM

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.

5 participants