* Fix compile unit test bug.

This commit is contained in:
wangyuting
2023-12-29 17:12:17 +08:00
parent a8a149cc47
commit 07671ec538
2 changed files with 10 additions and 8 deletions
@@ -13,8 +13,9 @@ title=测试 compileModel->syncGitlabBuildList();
cid=1
pid=1
- 调用gitlab接口之前的compile数量。 @1
- 调用gitlab接口之后的compile数量。 @50
- 执行 @1
- 调用gitlab接口之前的获取不到ID为50的compile。属性50 @~~
- 调用gitlab接口之后的能获取到ID为50的compile。第50条的name属性 @这是一个Job2
*/
@@ -22,6 +23,7 @@ $tester->loadModel('compile');
$gitlabPairs = $tester->loadModel('pipeline')->getList('gitlab');
$job = $tester->loadModel('job')->getByID(2);
$server = zget($gitlabPairs, $job->server);
r(count($tester->compile->getListByJobID(2))) && p() && e(1); //调用gitlab接口之前的compile数量。
r(1) && p() && e('1');
r($tester->compile->getListByJobID(2)) && p('50') && e('~~'); //调用gitlab接口之前的获取不到ID为50的compile。
$tester->compile->syncGitlabBuildList($server, $job);
r(count($tester->compile->getListByJobID(2))) && p() && e(50); //调用gitlab接口之后的compile数量。
r($tester->compile->getListByJobID(2)) && p('50:name') && e('这是一个Job2'); //调用gitlab接口之后的能获取到ID为50的compile。