Skip to content

Commit

Permalink
user story #678027 : Create function that converts the testToRun to a…
Browse files Browse the repository at this point in the history
… parameter of a job
  • Loading branch information
Radislav Berkovich committed Aug 23, 2018
1 parent 22d4b56 commit 943aaf9
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ protected List<TestToRunData> parse(String rawTests) {
if (parameterParts.length != PARAMETER_SIZE) {
throw new IllegalArgumentException("Test' " + rawtest + "' contains illegal parameter format");
}
data.addParameters(testParts[0], testParts[1]);
data.addParameters(parameterParts[0], parameterParts[1]);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*/
public class MfUftConverter extends TestsToRunConverter {

private final String DATA_TABLE_PARAMETER = "dataTable";
public static final String DATA_TABLE_PARAMETER = "dataTable";
private static final DTOFactory dtoFactory = DTOFactory.getInstance();

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ public OctaneResultAbridged execute(OctaneTaskAbridged task) {
if (INIT.equalsIgnoreCase(path[1])) {
DiscoveryInfo discoveryInfo = dtoFactory.dtoFromJson(task.getBody(), DiscoveryInfo.class);
pluginServices.runTestDiscovery(discoveryInfo);
PipelineNode node = pluginServices.createExecutor(discoveryInfo);
if (node != null) {
result.setBody(dtoFactory.dtoToJson(node));
result.getHeaders().put(HttpHeaders.CONTENT_TYPE, ContentType.APPLICATION_JSON.getMimeType());
}
result.setStatus(200);
} else if (SUITE_RUN.equalsIgnoreCase(path[1])) {
TestSuiteExecutionInfo testSuiteExecutionInfo = dtoFactory.dtoFromJson(task.getBody(), TestSuiteExecutionInfo.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,6 @@ public interface CIPluginServices {
void deleteExecutor(String id);

OctaneResponse upsertCredentials(CredentialsInfo credentialsInfo);

PipelineNode createExecutor(DiscoveryInfo discoveryInfo);
}
Original file line number Diff line number Diff line change
Expand Up @@ -129,4 +129,9 @@ public void deleteExecutor(String id) {
public OctaneResponse upsertCredentials(CredentialsInfo credentialsInfo) {
return null;
}

@Override
public PipelineNode createExecutor(DiscoveryInfo discoveryInfo) {
return null;
}
}

0 comments on commit 943aaf9

Please sign in to comment.