* Modify unit test directory structure and data generation method.
This commit is contained in:
@@ -17,10 +17,10 @@ cid=1
|
||||
|
||||
*/
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/git.class.php';
|
||||
include dirname(__FILE__, 2) . '/lib/git.unittest.class.php';
|
||||
|
||||
zdTable('pipeline')->gen(1);
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zenData('pipeline')->gen(1);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
su('admin');
|
||||
|
||||
$git = new gitTest();
|
||||
|
||||
@@ -15,8 +15,8 @@ cid=1
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('pipeline')->gen(1);
|
||||
zdTable('repo')->config('repo')->gen(10);
|
||||
zenData('pipeline')->gen(1);
|
||||
zenData('repo')->loadYaml('repo')->gen(10);
|
||||
su('admin');
|
||||
|
||||
global $tester;
|
||||
@@ -26,7 +26,7 @@ $repos = $git->getRepos();
|
||||
r(count($repos)) && p() && e('8'); // 获取git代码库的数量
|
||||
r($repos) && p('1') && e('https://gitlabdev.qc.oop.cc/root/unittest11'); // 获取第一条git记录的path属性
|
||||
|
||||
zdTable('repo')->gen(0);
|
||||
zenData('repo')->gen(0);
|
||||
dao::$cache = array();
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -13,7 +13,7 @@ cid=1
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
su('admin');
|
||||
|
||||
global $tester;
|
||||
|
||||
@@ -12,11 +12,11 @@ cid=1
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/git.class.php';
|
||||
include dirname(__FILE__, 2) . '/lib/git.unittest.class.php';
|
||||
|
||||
zdTable('job')->gen(0);
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zdTable('repohistory')->gen(0);
|
||||
zenData('job')->gen(0);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
zenData('repohistory')->gen(0);
|
||||
su('admin');
|
||||
|
||||
$git = new gitTest();
|
||||
|
||||
@@ -26,10 +26,10 @@ cid=1
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/git.class.php';
|
||||
include dirname(__FILE__, 2) . '/lib/git.unittest.class.php';
|
||||
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zdTable('repohistory')->gen(0);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
zenData('repohistory')->gen(0);
|
||||
su('admin');
|
||||
|
||||
$git = new gitTest();
|
||||
|
||||
@@ -15,8 +15,8 @@ cid=1
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('pipeline')->gen(1);
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zenData('pipeline')->gen(1);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
su('admin');
|
||||
|
||||
global $tester;
|
||||
|
||||
@@ -13,7 +13,7 @@ cid=1
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('repo')->config('repo')->gen(1);
|
||||
zenData('repo')->loadYaml('repo')->gen(1);
|
||||
su('admin');
|
||||
|
||||
global $tester;
|
||||
|
||||
@@ -17,7 +17,7 @@ cid=1
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
zdTable('repo')->config('repo')->gen(10);
|
||||
zenData('repo')->loadYaml('repo')->gen(10);
|
||||
su('admin');
|
||||
|
||||
global $tester;
|
||||
@@ -27,7 +27,7 @@ $git->setRepos();
|
||||
r(count($git->repos)) && p() && e('8'); // 获取不到数据时,提示错误信息
|
||||
r($git->repos) && p('1:name,SCM') && e('unittest1,Gitlab'); // 获取第一条git记录的name和SCM属性
|
||||
|
||||
zdTable('repo')->gen(0);
|
||||
zenData('repo')->gen(0);
|
||||
dao::$cache = array();
|
||||
|
||||
ob_start();
|
||||
|
||||
@@ -16,12 +16,12 @@ cid=1
|
||||
*/
|
||||
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
include dirname(__FILE__, 2) . '/git.class.php';
|
||||
include dirname(__FILE__, 2) . '/lib/git.unittest.class.php';
|
||||
|
||||
$repo = zdTable('repo')->config('repo');
|
||||
$repo = zenData('repo')->loadYaml('repo');
|
||||
$repo->path->range('https://gitlabdev.qc.oop.cc/root/unittest1');
|
||||
$repo->gen(3);
|
||||
zdTable('repohistory')->config('repohistory')->gen(1);
|
||||
zenData('repohistory')->loadYaml('repohistory')->gen(1);
|
||||
su('admin');
|
||||
|
||||
$git = new gitTest();
|
||||
|
||||
Reference in New Issue
Block a user