[agent-operator] - update dltu part

This commit is contained in:
zeaslity
2024-04-26 17:51:11 +08:00
parent 318a5a8026
commit 021690f5c4
12 changed files with 338 additions and 197 deletions

View File

@@ -88,7 +88,7 @@ func TestImagePushToOctopusKindHarbor(t *testing.T) {
assert.Equal(t, target, true, "image re-tag error !")
// push
pushResult := PushToOctopusKindHarbor(newTag)
pushResult := UploadToOctopusKindHarbor(newTag)
defer pushResult.Close()
scanner := bufio.NewScanner(pushResult)
@@ -109,7 +109,7 @@ func TestImageLoadFromFile(t *testing.T) {
func TestImageSaveToTarGZ(t *testing.T) {
image := "harbor.cdcyy.com.cn/cmii/cmii-uav-gateway:4.1.6-beta"
imageSaveToTarGZ := SaveToTarGZ(image, "/home/wdd/IdeaProjects/ProjectOctopus/cmii_operator/log")
imageSaveToTarGZ, _ := SaveToGzipFile(image, "/home/wdd/IdeaProjects/ProjectOctopus/cmii_operator/log")
assert.Equal(t, imageSaveToTarGZ, true, "image save to tar gz file error !")
}
@@ -149,7 +149,7 @@ func TestImageTagFromSourceToTarget(t *testing.T) {
targetImageName := "harbor.wdd.io:8033/cmii/srs:v5.0.195"
if TagFromSourceToTarget(sourceImageName, targetImageName) {
pushResult := PushToOctopusKindHarbor(targetImageName)
pushResult := UploadToOctopusKindHarbor(targetImageName)
defer pushResult.Close()
scanner := bufio.NewScanner(pushResult)
@@ -188,7 +188,7 @@ func TestSaveSpecificImageToGzipFile(t *testing.T) {
// image pull success
log.InfoF("image should have pulled successful ! => %s", imageFullName)
if !SaveToTarGZ(imageFullName, imageGzipFilePathPrefix) {
if !SaveToGzipFile(imageFullName, imageGzipFilePathPrefix) {
log.ErrorF("image save to gzip file error ! => %s", imageFullName)
return
}