[Agent][Operator] - bug fix
This commit is contained in:
@@ -252,7 +252,8 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
|
||||
// 计算20:00的时间
|
||||
now := time.Now()
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 12, 14, 00, 0, now.Location())
|
||||
|
||||
targetTime := time.Date(now.Year(), now.Month(), now.Day(), 8, 58, 30, 0, now.Location())
|
||||
|
||||
duration := time.Duration(0)
|
||||
|
||||
@@ -275,9 +276,7 @@ func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
|
||||
|
||||
appNameTagMap := map[string]string{
|
||||
//"cmii-uav-multilink": "5.5.0",
|
||||
//"cmii-uav-mqtthandler": "5.5.0",
|
||||
//"cmii-uav-mission": "5.5.0-042901",
|
||||
"cmii-uav-surveillance": "5.5.0-042901",
|
||||
"cmii-uav-industrial-portfolio": "5.5.0-050801",
|
||||
}
|
||||
|
||||
for appName, newTag := range appNameTagMap {
|
||||
|
||||
@@ -156,6 +156,18 @@ func DownloadCompressUpload(fullNameList []string, shouldGzip bool, gzipFolderFu
|
||||
fullNameList = slices.DeleteFunc(fullNameList, func(imageName string) bool {
|
||||
return slices.Contains(errorGzipImageList, imageName)
|
||||
})
|
||||
|
||||
// write to file
|
||||
targetFile := gzipFolderFullPath + string(os.PathSeparator) + "all-gzip-image-file-name.txt"
|
||||
|
||||
for _, gzipFileFullName := range allGzipFileNameList {
|
||||
utils.AppendContentToFile(
|
||||
strings.TrimPrefix(gzipFileFullName, gzipFolderFullPath),
|
||||
targetFile,
|
||||
)
|
||||
}
|
||||
|
||||
log.InfoF("all gzip file name list is %s", targetFile)
|
||||
}
|
||||
|
||||
// Upload
|
||||
|
||||
@@ -38,10 +38,11 @@ func TestPullFromEntityAndSyncConditionally(t *testing.T) {
|
||||
// 创建一个模拟的sync对象,用于测试函数的行为。这里需要根据你的实际需求来设置mock数据和预期结果。
|
||||
sync := ImageSyncEntity{
|
||||
CmiiNameTagList: []string{
|
||||
"cmii-uav-platform:5.5.0-offline",
|
||||
//"cmii-uav-platform:5.5.0-offline",
|
||||
},
|
||||
FullNameImageList: nil,
|
||||
ProjectVersion: "",
|
||||
ProjectName: "xjyd",
|
||||
DirectHarborHost: "harbor.wdd.io",
|
||||
CompressImageToGzip: true,
|
||||
UploadToDemoMinio: true,
|
||||
|
||||
@@ -31,3 +31,8 @@
|
||||
2024-04-29-12-13-03 uavcloud-demo cmii-uav-mission 5.5.0-042401 5.5.0-042901
|
||||
2024-04-29-12-14-37 uavcloud-demo cmii-uav-surveillance 5.5.0-042401 5.5.0-042901
|
||||
2024-04-29-12-14-38 uavcloud-demo cmii-uav-mqtthandler 5.5.0-042901 5.5.0
|
||||
2024-04-29-17-36-00 uavcloud-demo cmii-uav-platform 5.5.0-042901 5.5.0-042903
|
||||
2024-04-29-17-36-45 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-29353-042801 5.5.0-042901
|
||||
2024-04-30-11-57-00 uavcloud-demo cmii-uav-platform 5.5.0-042903 5.5.0-043001
|
||||
2024-04-30-17-22-52 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-042901 5.5.0-043001
|
||||
2024-05-08-08-58-30 uavcloud-demo cmii-uav-industrial-portfolio 5.5.0-043001 5.5.0-050801
|
||||
|
||||
Reference in New Issue
Block a user