* Modify unit test directory structure and data generation method.

This commit is contained in:
liyang
2024-04-22 14:25:50 +08:00
parent f909ed2792
commit 354c300c86
2674 changed files with 7803 additions and 7803 deletions
+3 -3
View File
@@ -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();
+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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;
+4 -4
View File
@@ -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();
+3 -3
View File
@@ -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();
+2 -2
View File
@@ -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;
+1 -1
View File
@@ -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;
+2 -2
View File
@@ -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();
+3 -3
View File
@@ -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();