Commit 44067c16 authored by Mayank Saggar [Microsoft]'s avatar Mayank Saggar [Microsoft]
Browse files

Trigger test workflow call taken out of the AzureTest Class to CoreTest class.

parent ff960378
Pipeline #18069 failed with stages
in 6 minutes and 40 seconds
......@@ -14,23 +14,12 @@
package org.opengroup.osdu.azure.workflow.workflow;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.BeforeEach;
import org.opengroup.osdu.azure.workflow.utils.HTTPClientAzure;
import org.opengroup.osdu.workflow.util.HTTPClient;
import org.opengroup.osdu.workflow.workflow.GetWorkflowRunByIdIntegrationTests;
import java.util.Map;
public class TestGetWorkflowRunByIdIntegration extends GetWorkflowRunByIdIntegrationTests {
@BeforeAll
public static void run() throws Exception {
HTTPClient client = new HTTPClientAzure();
Map<String, String> headers = client.getCommonHeader();
triggerTestWorkflow(client, headers);
}
@BeforeEach
@Override
public void setup() {
......
......@@ -76,7 +76,7 @@ public abstract class GetWorkflowByIdIntegrationTests extends TestBase {
String error = response.getEntity(String.class);
assertTrue(error.contains(String.format(WORKFLOW_NOT_FOUND_MESSAGE,INVALID_WORKFLOW_ID)));
assertTrue(error.contains(String.format(WORKFLOW_NOT_FOUND_MESSAGE, INVALID_WORKFLOW_ID)));
}
@Test
......
......@@ -47,6 +47,8 @@ public abstract class GetWorkflowRunByIdIntegrationTests extends TestBase {
@Test
public void should_returnSuccess_when_givenValidRequest() throws Exception {
triggerTestWorkflow(client, headers);
ClientResponse workflowRunResponse = client.send(
HttpMethod.GET,
String.format(GET_WORKFLOW_RUN_URL,
......@@ -103,6 +105,8 @@ public abstract class GetWorkflowRunByIdIntegrationTests extends TestBase {
@Test
public void should_returnUnauthorized_when_notGivenAccessToken() throws Exception {
triggerTestWorkflow(client, headers);
ClientResponse response = client.send(
HttpMethod.GET,
String.format(GET_WORKFLOW_RUN_URL,
......@@ -118,6 +122,8 @@ public abstract class GetWorkflowRunByIdIntegrationTests extends TestBase {
@Test
public void should_returnUnauthorized_when_givenNoDataAccessToken() throws Exception {
triggerTestWorkflow(client, headers);
ClientResponse response = client.send(
HttpMethod.GET,
String.format(GET_WORKFLOW_RUN_URL,
......@@ -133,6 +139,8 @@ public abstract class GetWorkflowRunByIdIntegrationTests extends TestBase {
@Test
public void should_returnUnauthorized_when_givenInvalidPartition() throws Exception {
triggerTestWorkflow(client, headers);
ClientResponse response = client.send(
HttpMethod.GET,
String.format(GET_WORKFLOW_RUN_URL,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment