From bfbf9a1d92615f8b734fa39753de744fc89cd843 Mon Sep 17 00:00:00 2001 From: zhouxudong Date: Wed, 11 May 2022 07:38:30 +0000 Subject: [PATCH] * Add auto test from compile. --- test/model/compile/getbuildurl.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/test/model/compile/getbuildurl.php b/test/model/compile/getbuildurl.php index e8c45e8a45..22142a7a9a 100755 --- a/test/model/compile/getbuildurl.php +++ b/test/model/compile/getbuildurl.php @@ -11,7 +11,20 @@ cid=1 pid=1 */ +$jenkins1 = new stdclass(); +$jenkins1->url = 'pms.cc.cc'; +$jenkins1->account = '123456'; +$jenkins1->token = 'zxd'; +$jenkins1->pipeline = '12'; + +$jenkins2 = new stdclass(); +$jenkins2->url = 'pms.cc.cc'; +$jenkins2->account = '123456'; +$jenkins2->password = '8bb44ffbc4b42fcbb3152cc05fd21c67'; +$jenkins2->token = ''; +$jenkins2->pipeline = '11'; $compile = new compileTest(); -r($compile->getBuildUrlTest()) && p() && e(); \ No newline at end of file +r($compile->getBuildUrlTest($jenkins1)) && p('userPWD') && e('123456:zxd'); //检测password为空时获取的信息 +r($compile->getBuildUrlTest($jenkins2)) && p('url') && e('pms.cc.cc/job/11/buildWithParameters/api/json'); //检测token为空时获取的信息