启动测试
This commit is contained in:
parent
d6f285a1d4
commit
792cb2bfe8
|
@ -1,11 +1,15 @@
|
|||
package io.metersphere.controller.request;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class TestRequest {
|
||||
|
||||
private int size;
|
||||
private String fileString;
|
||||
private String testId;
|
||||
private String image;
|
||||
private Map<String, String> testData = new HashMap<>();
|
||||
|
||||
public int getSize() {
|
||||
return size;
|
||||
|
@ -38,4 +42,12 @@ public class TestRequest {
|
|||
public void setImage(String image) {
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public Map<String, String> getTestData() {
|
||||
return testData;
|
||||
}
|
||||
|
||||
public void setTestData(Map<String, String> testData) {
|
||||
this.testData = testData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public abstract class AbstractEngine implements Engine {
|
|||
if (resourcePool == null) {
|
||||
MSException.throwException("Resource Pool is empty");
|
||||
}
|
||||
if (!ResourcePoolTypeEnum.K8S.name().equals(resourcePool.getType())) {
|
||||
if (!ResourcePoolTypeEnum.K8S.name().equals(resourcePool.getType()) && !ResourcePoolTypeEnum.NODE.name().equals(resourcePool.getType())) {
|
||||
MSException.throwException("Invalid Resource Pool type.");
|
||||
}
|
||||
this.resourceList = testResourceService.getResourcesByPoolId(resourcePool.getId());
|
||||
|
|
|
@ -84,6 +84,7 @@ public class DockerTestEngine extends AbstractEngine {
|
|||
testRequest.setTestId(testId);
|
||||
testRequest.setFileString(content);
|
||||
testRequest.setImage(registryService.getRegistry() + JMETER_IMAGE);
|
||||
testRequest.setTestData(context.getTestData());
|
||||
|
||||
// todo 判断测试状态
|
||||
String taskStatusUri = String.format(BASE_URL + "/jmeter/task/status/" + testId, nodeIp, port);
|
||||
|
|
Loading…
Reference in New Issue