feat(项目设置): 增加需求同步测试覆盖率
This commit is contained in:
parent
3445189a78
commit
cabc48cbbc
|
@ -12,6 +12,7 @@ import io.metersphere.plugin.platform.dto.response.PlatformDemandDTO;
|
||||||
import io.metersphere.plugin.platform.utils.PluginPager;
|
import io.metersphere.plugin.platform.utils.PluginPager;
|
||||||
import io.metersphere.project.domain.ProjectApplication;
|
import io.metersphere.project.domain.ProjectApplication;
|
||||||
import io.metersphere.project.mapper.ProjectApplicationMapper;
|
import io.metersphere.project.mapper.ProjectApplicationMapper;
|
||||||
|
import io.metersphere.project.service.ProjectApplicationService;
|
||||||
import io.metersphere.sdk.constants.ProjectApplicationType;
|
import io.metersphere.sdk.constants.ProjectApplicationType;
|
||||||
import io.metersphere.sdk.constants.SessionConstants;
|
import io.metersphere.sdk.constants.SessionConstants;
|
||||||
import io.metersphere.sdk.domain.OperationLog;
|
import io.metersphere.sdk.domain.OperationLog;
|
||||||
|
@ -74,6 +75,9 @@ public class FunctionalCaseDemandControllerTests extends BaseTest {
|
||||||
private int mockServerHostPort;
|
private int mockServerHostPort;
|
||||||
@Resource
|
@Resource
|
||||||
private ProjectApplicationMapper projectApplicationMapper;
|
private ProjectApplicationMapper projectApplicationMapper;
|
||||||
|
@Resource
|
||||||
|
private ProjectApplicationService projectApplicationService;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private static final String URL_DEMAND_PAGE = "/functional/case/demand/page";
|
private static final String URL_DEMAND_PAGE = "/functional/case/demand/page";
|
||||||
|
@ -681,6 +685,9 @@ public class FunctionalCaseDemandControllerTests extends BaseTest {
|
||||||
projectApplicationMapper.batchInsert(relatedConfigs);
|
projectApplicationMapper.batchInsert(relatedConfigs);
|
||||||
|
|
||||||
demandSyncService.syncPlatformDemandBySchedule("gyq_project-case-demand-test", "admin");
|
demandSyncService.syncPlatformDemandBySchedule("gyq_project-case-demand-test", "admin");
|
||||||
|
|
||||||
|
String demandPlatformId = projectApplicationService.getDemandPlatformId("gyq_project-case-demand-test");
|
||||||
|
Assertions.assertTrue(StringUtils.isNotBlank(demandPlatformId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue