* [test] Fix unit test for devops.

This commit is contained in:
liyang
2024-07-05 15:38:45 +08:00
committed by 曹延义
parent 83e2be4c53
commit 9830fd9f2f
5 changed files with 10 additions and 13 deletions
+3 -2
View File
@@ -43,7 +43,8 @@ $result = $gitlab->apiDeleteTag($gitlabID, $projectID, $tagName);
r($result) && p('message') && e('You are not allowed to create this tag as it is protected.'); //删除受保护的标签
$tag = (object)array('tag_name' => 'test_tag17', 'ref' => 'master');
$gitlab->createTag($gitlabID, $projectID, $tag);
$url = sprintf($gitlab->getApiRoot($gitlabID), "/projects/" . $projectID . '/repository/tags');
commonModel::http($url, $tag);
$result = $gitlab->apiDeleteTag($gitlabID, $projectID, $tag->tag_name);
if(!$result or substr($result->message, 0, 2) == '20') $result = 'return true';
r($result) && p('message') && e('return true'); //成功删除标签
r($result) && p('message') && e('return true'); //成功删除标签