diff --git a/module/compile/test/model/synccompile.php b/module/compile/test/model/synccompile.php index ea46ba96a0..8353241748 100755 --- a/module/compile/test/model/synccompile.php +++ b/module/compile/test/model/synccompile.php @@ -15,8 +15,8 @@ pid=1 - 调用jenkins接口之前job为1的compile数量。 @1 - 调用jenkins接口之后job为1的compile数量。 @17 -- 调用gitlab接口之前的compile数量。 @1 -- 调用gitlab接口之后的compile数量。 @50 +- 调用gitlab接口之前的获取不到ID为50的compile。属性50 @~~ +- 调用gitlab接口之后的能获取到ID为50的compile。第50条的name属性 @这是一个Job2 */ @@ -25,6 +25,6 @@ r(count($tester->compile->getListByJobID(1))) && p() && e(1); //调用jenkins $tester->compile->syncCompile(0, 1); r(count($tester->compile->getListByJobID(1))) && p() && e(17); //调用jenkins接口之后job为1的compile数量。 -r(count($tester->compile->getListByJobID(2))) && p() && e(1); //调用gitlab接口之前的compile数量。 +r($tester->compile->getListByJobID(2)) && p('50') && e('~~'); //调用gitlab接口之前的获取不到ID为50的compile。 $tester->compile->syncCompile(0, 2); -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。 diff --git a/module/compile/test/model/syncgitlabbuildlist.php b/module/compile/test/model/syncgitlabbuildlist.php index 0a000c96f1..1e1b3dcb92 100755 --- a/module/compile/test/model/syncgitlabbuildlist.php +++ b/module/compile/test/model/syncgitlabbuildlist.php @@ -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。