* Adjust the unit test data.
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -26,4 +25,3 @@ r($git->convertLog($log)) && p('revision') && e('e7699d04f1586d337f34496da932dde
|
||||
$log = array();
|
||||
r($git->convertLog($log)) && p('revision') && e(0); // 使用空的数据
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -29,4 +28,3 @@ $repo->client = '';
|
||||
$repo->path = '';
|
||||
r($git->getRepoLogs($repo)) && p() && e(0); // 使用错误的版本库
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -21,4 +20,3 @@ $git = new gitTest();
|
||||
$tester->dao->update(TABLE_REPO)->set('synced')->eq(1)->where('id')->eq(1)->exec();
|
||||
r($git->getRepos()) && p() && e('http://10.0.1.161:51080/api/v4/projects/42/repository/'); // 获取版本库
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -32,4 +31,3 @@ $repo->client = '';
|
||||
$repo->path = '';
|
||||
r($git->getRepoTags($repo)) && p() && e(0); // 使用错误的版本库
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -25,4 +24,3 @@ $repo = $tester->dao->select('*')->from(TABLE_REPO)->limit(1)->fetch();
|
||||
if(strtolower($repo->SCM) == 'gitlab') $repo = $tester->loadModel('repo')->processGitlab($repo);
|
||||
r($git->setRepo($repo)) && p("result,client,repoRoot") && e("1,1,1"); // 设置正确版本库参数
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -19,4 +18,3 @@ $git = new gitTest();
|
||||
$tester->dao->update(TABLE_REPO)->set('synced')->eq(1)->where('id')->eq(1)->exec();
|
||||
r($git->setRepos()) && p('id') && e(1); // 设置版本库
|
||||
|
||||
$db->restoreDB();
|
||||
@@ -2,7 +2,6 @@
|
||||
<?php
|
||||
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
|
||||
include dirname(dirname(dirname(__FILE__))) . '/class/git.class.php';
|
||||
$db->switchDB();
|
||||
su('admin');
|
||||
|
||||
/**
|
||||
@@ -24,4 +23,3 @@ r($git->updateCommit($repo)) && p() && e(1); // 测试正常的版本库
|
||||
$repo = new stdclass();
|
||||
r($git->updateCommit($repo)) && p() && e(0); // 测试空的版本库
|
||||
|
||||
$db->restoreDB();
|
||||
Reference in New Issue
Block a user