[ Server ] [ Executor ] - 初步实现测试代码
This commit is contained in:
@@ -27,7 +27,7 @@ public class ServerInfoTest {
|
||||
ServerQueryEntity serverQueryEntity = new ServerQueryEntity();
|
||||
|
||||
// Act
|
||||
R<Page<ServerInfoVO>> result = serverController.serverGetAllByPage(serverQueryEntity);
|
||||
R<Page<ServerInfoPO>> result = serverController.serverGetAllByPage(serverQueryEntity);
|
||||
|
||||
// Assert
|
||||
assertNotNull(result);
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
package io.wdd.server.func;
|
||||
|
||||
import io.wdd.func.auto.beans.ProjectDeployContext;
|
||||
import io.wdd.func.auto.service.BaseFuncScheduler;
|
||||
import io.wdd.server.beans.po.ServerInfoPO;
|
||||
import io.wdd.server.beans.request.ServerQueryEntity;
|
||||
import io.wdd.server.coreService.CoreServerService;
|
||||
import org.junit.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@SpringBootTest
|
||||
public class TestBaseFuncScheduler {
|
||||
|
||||
|
||||
@Resource
|
||||
BaseFuncScheduler baseFuncScheduler;
|
||||
|
||||
@Resource
|
||||
CoreServerService serverService;
|
||||
|
||||
|
||||
@Test
|
||||
public void testRunProcedure() {
|
||||
|
||||
ProjectDeployContext projectDeployContext = new ProjectDeployContext();
|
||||
|
||||
projectDeployContext.setProjectId(1716372290994155522L);
|
||||
|
||||
ServerQueryEntity serverQueryEntity = new ServerQueryEntity();
|
||||
serverQueryEntity.setServerName("Osaka");
|
||||
ServerInfoPO serverInfoPO = serverService
|
||||
.serverGetByPage(serverQueryEntity)
|
||||
.getRecords()
|
||||
.get(0);
|
||||
|
||||
projectDeployContext.setMasterNode(serverInfoPO);
|
||||
|
||||
|
||||
baseFuncScheduler.runProcedure(projectDeployContext);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user