file type engine type

This commit is contained in:
Captain.B 2020-03-16 16:18:57 +08:00
parent a1311ca540
commit 454320f9a4
1 changed files with 5 additions and 6 deletions

View File

@ -6,7 +6,6 @@ import io.metersphere.base.domain.FileContent;
import io.metersphere.base.domain.FileMetadata; import io.metersphere.base.domain.FileMetadata;
import io.metersphere.base.domain.LoadTestWithBLOBs; import io.metersphere.base.domain.LoadTestWithBLOBs;
import io.metersphere.commons.constants.EngineType; import io.metersphere.commons.constants.EngineType;
import io.metersphere.commons.constants.FileType;
import io.metersphere.commons.exception.MSException; import io.metersphere.commons.exception.MSException;
import io.metersphere.engine.docker.DockerTestEngine; import io.metersphere.engine.docker.DockerTestEngine;
import io.metersphere.engine.kubernetes.KubernetesTestEngine; import io.metersphere.engine.kubernetes.KubernetesTestEngine;
@ -20,10 +19,10 @@ public class EngineFactory {
public static Engine createEngine(String engineType) { public static Engine createEngine(String engineType) {
final EngineType type = EngineType.valueOf(engineType); final EngineType type = EngineType.valueOf(engineType);
if (type == EngineType.DOCKER) { switch (type) {
case DOCKER:
return new DockerTestEngine(); return new DockerTestEngine();
} case KUBERNETES:
if (type == EngineType.KUBERNETES) {
return new KubernetesTestEngine(); return new KubernetesTestEngine();
} }
return null; return null;