This commit is contained in:
zeaslity
2025-05-15 10:32:46 +08:00
parent 92d0f10933
commit dbb45c553b
22 changed files with 23771 additions and 23463 deletions

View File

@@ -3,6 +3,7 @@ package main
import (
"testing"
image2 "wdd.io/agent-common/image"
"wdd.io/agent-common/real_project"
"wdd.io/agent-common/utils"
)
@@ -47,16 +48,21 @@ func TestLoadSplitDepGzipImageToTargetHarbor(t *testing.T) {
func TestPullFromEntityAndSyncConditionally(t *testing.T) {
// 全部镜像列表
fullImageList := []string{}
fullImageList = append(fullImageList, real_project.CmiiUas2ImageList...)
fullImageList = append(fullImageList, real_project.CmiiSRSImageList...)
fullImageList = append(fullImageList, real_project.CmiiDorisImageList...)
// 下载镜像的核心函数
sync := ImageSyncEntity{
DownloadCondition: &DownloadEntity{
ShouldDownloadImage: true,
ProjectName: "6.2.0_demo",
ProjectVersion: "6.2.0-demo",
CmiiNameTagList: []string{
//"cmii-uav-mqtthandler:5.4.0-bjdyt-052102",
},
FullNameImageList: []string{},
ShouldDownloadImage: true,
ProjectName: "uavms-2.0",
ProjectVersion: "",
CmiiNameTagList: []string{},
FullNameImageList: fullImageList,
DownloadAuthUserName: "",
DownloadAuthPassword: "",
},