[ Server ] [ Executor ] - 初步实现测试代码

This commit is contained in:
zeaslity
2023-10-23 16:58:34 +08:00
parent b42748cfbb
commit 92a10b6dbd
10 changed files with 101 additions and 14 deletions

View File

@@ -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);

View File

@@ -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);
}
}