新增cursor的配置
This commit is contained in:
@@ -3,7 +3,7 @@ package main
|
||||
import (
|
||||
"testing"
|
||||
"wdd.io/agent-operator/config"
|
||||
|
||||
|
||||
image2 "wdd.io/agent-common/image"
|
||||
"wdd.io/agent-common/real_project"
|
||||
"wdd.io/agent-common/real_project/zhejianyidong_erjipingtai"
|
||||
@@ -11,13 +11,13 @@ import (
|
||||
)
|
||||
|
||||
func TestCmiiEnvDeploy(t *testing.T) {
|
||||
|
||||
|
||||
// dev
|
||||
// devflight
|
||||
// devoperation
|
||||
|
||||
|
||||
deployNamespace := config.DevFlight
|
||||
|
||||
|
||||
// deploy to cmii environment
|
||||
cmiiDeployCommonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "lab.uavcmlc.com",
|
||||
@@ -32,13 +32,13 @@ func TestCmiiEnvDeploy(t *testing.T) {
|
||||
NFSServerIP: "123.0.0.1",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeploy(cmiiDeployCommonEnv, false, deployNamespace)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ChongQingSanHua(t *testing.T) {
|
||||
|
||||
|
||||
// chongqing sanhua
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.133.115.164",
|
||||
@@ -48,13 +48,13 @@ func TestCmiiEnvDeploy_ChongQingSanHua(t *testing.T) {
|
||||
Namespace: "wrj",
|
||||
TagVersion: "5.6.0",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeploy(commonEnv, true, config.Demo)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiangSuNanTongErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 江苏南通二级平台 2025-01
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "10.40.51.5",
|
||||
@@ -69,19 +69,19 @@ func TestCmiiEnvDeploy_JiangSuNanTongErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "10.40.51.5",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii611ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ShenZhenGuiZiXiangMu(t *testing.T) {
|
||||
|
||||
|
||||
// 深证规自项目 2025-02
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "172.31.2.7",
|
||||
WebPort: "8088",
|
||||
HarborIPOrCustomImagePrefix: "172.31.2.7",
|
||||
HarborPort: "8033/cmii",
|
||||
HarborPort: "8033/admin",
|
||||
Namespace: "szgz",
|
||||
TagVersion: "6.2.0",
|
||||
TenantEnv: "",
|
||||
@@ -90,13 +90,13 @@ func TestCmiiEnvDeploy_ShenZhenGuiZiXiangMu(t *testing.T) {
|
||||
NFSServerIP: "172.31.2.9",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii611ImageList)
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii620ArmImageList)
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_LiuXiTongGan(t *testing.T) {
|
||||
|
||||
|
||||
// 刘喜通感
|
||||
// 修改
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
@@ -112,13 +112,13 @@ func TestCmiiEnvDeploy_LiuXiTongGan(t *testing.T) {
|
||||
NFSServerIP: "10.250.0.200",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeploy(commonEnv, true, config.Demo)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ZheJiangYiDongErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 浙江移动二级平台
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "111.2.224.59",
|
||||
@@ -130,13 +130,13 @@ func TestCmiiEnvDeploy_ZheJiangYiDongErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "192.168.10.3",
|
||||
MinioInnerIP: "192.168.10.2",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, zhejianyidong_erjipingtai.Cmii570ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ZiyangTongGan(t *testing.T) {
|
||||
|
||||
|
||||
// 资阳通感
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "80.192.1.46",
|
||||
@@ -151,13 +151,13 @@ func TestCmiiEnvDeploy_ZiyangTongGan(t *testing.T) {
|
||||
NFSServerIP: "80.192.1.48",
|
||||
ApplyFilePrefix: "/root/wddproject/ProjectOctopus/agent-common/real_project/zygajg",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii600ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiChengCeShiHuanJing(t *testing.T) {
|
||||
|
||||
|
||||
// 2024上线测试-集成测试环境
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "integration.uavcmlc.com",
|
||||
@@ -172,13 +172,13 @@ func TestCmiiEnvDeploy_JiChengCeShiHuanJing(t *testing.T) {
|
||||
NFSServerIP: "10.40.51.5",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeploy(commonEnv, false, "")
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_XinDEMO(t *testing.T) {
|
||||
|
||||
|
||||
// 202501 新DEMO
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "www.demo.uavcmlc.com",
|
||||
@@ -193,13 +193,33 @@ func TestCmiiEnvDeploy_XinDEMO(t *testing.T) {
|
||||
NFSServerIP: "192.168.118.15",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeploy(commonEnv, true, "")
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiangXiOldShengJi(t *testing.T) {
|
||||
// 江西 旧平台 升级
|
||||
// 2025年2月20日
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.138.132.240",
|
||||
WebPort: "30800",
|
||||
HarborIPOrCustomImagePrefix: "10.20.1.130",
|
||||
HarborPort: "8033",
|
||||
Namespace: "jxyd",
|
||||
TagVersion: "6.2.0",
|
||||
TenantEnv: "",
|
||||
MinioPublicIP: "",
|
||||
MinioInnerIP: "10.20.1.132",
|
||||
NFSServerIP: "10.20.1.132",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii620ImageList)
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiangXiTongGanErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 江西同感二级平台
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.138.111.244",
|
||||
@@ -214,13 +234,13 @@ func TestCmiiEnvDeploy_JiangXiTongGanErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "10.20.1.135",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii600ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ShangDongErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 山东二级平台
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "134.80.124.6",
|
||||
@@ -235,13 +255,13 @@ func TestCmiiEnvDeploy_ShangDongErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "134.80.124.21",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii600ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiangSuNanTong(t *testing.T) {
|
||||
|
||||
|
||||
// 江苏南通
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "10.40.51.5",
|
||||
@@ -253,13 +273,13 @@ func TestCmiiEnvDeploy_JiangSuNanTong(t *testing.T) {
|
||||
NFSServerIP: "10.40.51.5",
|
||||
MinioInnerIP: "10.40.51.5",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii570ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ChongQingErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 江苏南通
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.133.115.174",
|
||||
@@ -274,13 +294,13 @@ func TestCmiiEnvDeploy_ChongQingErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "192.168.9.11",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii570ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_YunNanErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 江苏南通
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.147.6.78",
|
||||
@@ -295,13 +315,13 @@ func TestCmiiEnvDeploy_YunNanErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "192.168.118.15",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii570ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_LiaoNingYingJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 辽宁应急
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "120.201.112.20",
|
||||
@@ -316,13 +336,13 @@ func TestCmiiEnvDeploy_LiaoNingYingJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "192.168.40.193",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii620ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ZhuHaiHengQing(t *testing.T) {
|
||||
|
||||
|
||||
// 珠海横琴
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "10.129.80.218",
|
||||
@@ -337,13 +357,13 @@ func TestCmiiEnvDeploy_ZhuHaiHengQing(t *testing.T) {
|
||||
NFSServerIP: "10.129.80.217",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii600ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_ZheJiangErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 浙江二级平台扩容
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "111.2.224.59",
|
||||
@@ -358,13 +378,13 @@ func TestCmiiEnvDeploy_ZheJiangErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "192.168.10.2",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii611ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_JiLinYiDong(t *testing.T) {
|
||||
|
||||
|
||||
// 吉林移动
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "36.135.17.162",
|
||||
@@ -379,13 +399,13 @@ func TestCmiiEnvDeploy_JiLinYiDong(t *testing.T) {
|
||||
NFSServerIP: "192.168.118.15",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii580ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_GanSuErJiPingTai(t *testing.T) {
|
||||
|
||||
|
||||
// 甘肃二级平台
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "117.156.17.88",
|
||||
@@ -400,13 +420,13 @@ func TestCmiiEnvDeploy_GanSuErJiPingTai(t *testing.T) {
|
||||
NFSServerIP: "10.215.66.89",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii611ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiEnvDeploy_YunNanErJiXin(t *testing.T) {
|
||||
|
||||
|
||||
// 云南二级平台-新
|
||||
commonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "39.129.174.66",
|
||||
@@ -421,15 +441,15 @@ func TestCmiiEnvDeploy_YunNanErJiXin(t *testing.T) {
|
||||
NFSServerIP: "192.168.186.15",
|
||||
ApplyFilePrefix: "",
|
||||
}
|
||||
|
||||
|
||||
CmiiEnvDeployOffline(commonEnv, true, real_project.Cmii611ImageList)
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiNewAppDeploy(t *testing.T) {
|
||||
|
||||
|
||||
deployNamespace := config.DevOperation
|
||||
|
||||
|
||||
// deploy to cmii environment
|
||||
cmiiDeployCommonEnv := &z_dep.CommonEnvironmentConfig{
|
||||
WebIP: "lab.uavcmlc.com",
|
||||
@@ -439,7 +459,7 @@ func TestCmiiNewAppDeploy(t *testing.T) {
|
||||
Namespace: deployNamespace,
|
||||
TagVersion: "5.6.0",
|
||||
}
|
||||
|
||||
|
||||
CmiiNewAppDeploy(cmiiDeployCommonEnv, deployNamespace)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -10,61 +10,57 @@ import (
|
||||
*/
|
||||
|
||||
func TestFetchDependencyRepos_Middle(t *testing.T) {
|
||||
|
||||
|
||||
errorPullImageList, errorGzipImageList, realCmiiImageName, allGzipFileNameList := C_DownloadCompressUploadDependency(true, false, false)
|
||||
|
||||
|
||||
utils.BeautifulPrintListWithTitle(errorPullImageList, "errorPullImageList")
|
||||
utils.BeautifulPrintListWithTitle(errorGzipImageList, "errorGzipImageList")
|
||||
utils.BeautifulPrintListWithTitle(realCmiiImageName, "realCmiiImageName")
|
||||
utils.BeautifulPrintListWithTitle(allGzipFileNameList, "allGzipFileNameList")
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestFetchDependencyRepos_RKE(t *testing.T) {
|
||||
|
||||
|
||||
errorPullImageList, errorGzipImageList, realCmiiImageName, allGzipFileNameList := C_DownloadCompressUploadDependency(true, false, true)
|
||||
|
||||
|
||||
utils.BeautifulPrintListWithTitle(errorPullImageList, "errorPullImageList")
|
||||
utils.BeautifulPrintListWithTitle(errorGzipImageList, "errorGzipImageList")
|
||||
utils.BeautifulPrintListWithTitle(realCmiiImageName, "realCmiiImageName")
|
||||
utils.BeautifulPrintListWithTitle(allGzipFileNameList, "allGzipFileNameList")
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestLoadSplitGzipImageToTargetHarbor(t *testing.T) {
|
||||
errorLoadImageNameList, errorPushImageNameList := LoadSplitCmiiGzipImageToTargetHarbor("xmyd", DirectPushDeployHarborHost)
|
||||
|
||||
|
||||
utils.BeautifulPrintListWithTitle(errorLoadImageNameList, "errorLoadImageNameList")
|
||||
utils.BeautifulPrintListWithTitle(errorPushImageNameList, "errorPushImageNameList")
|
||||
}
|
||||
|
||||
func TestLoadSplitDepGzipImageToTargetHarbor(t *testing.T) {
|
||||
errorLoadImageNameList, errorPushImageNameList := LoadSplitDepGzipImageToTargetHarbor(DirectPushDeployHarborHost)
|
||||
|
||||
|
||||
utils.BeautifulPrintListWithTitle(errorLoadImageNameList, "errorLoadImageNameList")
|
||||
utils.BeautifulPrintListWithTitle(errorPushImageNameList, "errorPushImageNameList")
|
||||
}
|
||||
|
||||
func TestPullFromEntityAndSyncConditionally(t *testing.T) {
|
||||
|
||||
|
||||
// 下载镜像的核心函数
|
||||
sync := ImageSyncEntity{
|
||||
DownloadCondition: &DownloadEntity{
|
||||
ShouldDownloadImage: true,
|
||||
ProjectName: "szgz_6.2.0",
|
||||
ProjectVersion: "6.2.0-szgz-arm",
|
||||
CmiiNameTagList: []string{
|
||||
ProjectName: "6.2.0_demo",
|
||||
ProjectVersion: "6.2.0-demo",
|
||||
CmiiNameTagList: []string{
|
||||
//"cmii-uav-mqtthandler:5.4.0-bjdyt-052102",
|
||||
},
|
||||
FullNameImageList: []string{
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-mission:6.2.0-szgz-arm",
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-advanced5g:6.2.0-szgz-arm",
|
||||
"harbor.cdcyy.com.cn/cmii/cmii-uav-sense-adapter:6.2.0-szgz-arm",
|
||||
},
|
||||
FullNameImageList: []string{},
|
||||
DownloadAuthUserName: "",
|
||||
DownloadAuthPassword: "",
|
||||
},
|
||||
|
||||
|
||||
CompressCondition: &CompressEntity{
|
||||
ShouldCompressImageToGzip: true,
|
||||
ShouldGzipSplit: true,
|
||||
@@ -76,12 +72,12 @@ func TestPullFromEntityAndSyncConditionally(t *testing.T) {
|
||||
DirectHarborHost: "harbor.wdd.io:8033",
|
||||
ShouldDirectPushToHarbor: false,
|
||||
}
|
||||
|
||||
|
||||
// 调用函数并获取结果。这里需要根据你的实际需求来验证返回的结果是否符合预期。
|
||||
result := sync.PullFromEntityAndSyncConditionally()
|
||||
|
||||
|
||||
utils.BeautifulPrint(result)
|
||||
|
||||
|
||||
// 添加断言以检查函数的输出,例如:
|
||||
// ...其他验证逻辑...
|
||||
}
|
||||
@@ -93,7 +89,7 @@ func TestPullFromEntityAndSyncConditionally_ChongQingErJiPingTai(t *testing.T) {
|
||||
ShouldDownloadImage: true,
|
||||
ProjectName: "cqejpt",
|
||||
ProjectVersion: "",
|
||||
CmiiNameTagList: []string{
|
||||
CmiiNameTagList: []string{
|
||||
//"cmii-uav-mqtthandler:5.4.0-bjdyt-052102",
|
||||
},
|
||||
FullNameImageList: []string{
|
||||
@@ -162,7 +158,7 @@ func TestPullFromEntityAndSyncConditionally_ChongQingErJiPingTai(t *testing.T) {
|
||||
DownloadAuthUserName: "",
|
||||
DownloadAuthPassword: "",
|
||||
},
|
||||
|
||||
|
||||
CompressCondition: &CompressEntity{
|
||||
ShouldCompressImageToGzip: false,
|
||||
ShouldGzipSplit: true,
|
||||
@@ -174,43 +170,43 @@ func TestPullFromEntityAndSyncConditionally_ChongQingErJiPingTai(t *testing.T) {
|
||||
DirectHarborHost: "chongqingshcis-a189ec98.ecis.chongqing-1.cmecloud.cn",
|
||||
ShouldDirectPushToHarbor: true,
|
||||
}
|
||||
|
||||
|
||||
// 调用函数并获取结果。这里需要根据你的实际需求来验证返回的结果是否符合预期。
|
||||
result := sync.PullFromEntityAndSyncConditionally()
|
||||
|
||||
|
||||
utils.BeautifulPrint(result)
|
||||
|
||||
|
||||
// 添加断言以检查函数的输出,例如:
|
||||
// ...其他验证逻辑...
|
||||
}
|
||||
|
||||
func TestDownloadLoadTagUpload(t *testing.T) {
|
||||
|
||||
|
||||
localGzipFileList := []string{
|
||||
"/root/octopus_image/middle",
|
||||
"/root/octopus_image/rke",
|
||||
"/root/octopus_image/xjyd",
|
||||
}
|
||||
|
||||
|
||||
for _, s := range localGzipFileList {
|
||||
log.InfoF("start to sync => %s", s)
|
||||
|
||||
|
||||
targetImageFullNameList := A_DownloadLoadTagUpload(false, "", "", s, "172.28.0.251:8033")
|
||||
|
||||
|
||||
utils.BeautifulPrintListWithTitle(targetImageFullNameList, "targetImageFullNameList")
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
func TestConcatAndUniformCmiiImage(t *testing.T) {
|
||||
// 创建一个模拟的fullImageList和cmiiImageList,用于测试函数的行为。这里需要根据你的实际需求来设置mock数据和预期结果。
|
||||
fullImageList := []string{"image3", "image4"}
|
||||
cmiiImageList := []string{"image1", "image2"}
|
||||
|
||||
|
||||
// 调用函数并获取结果。这里需要根据你的实际需求来验证返回的结果是否符合预期。
|
||||
result := concatAndUniformCmiiImage(fullImageList, cmiiImageList)
|
||||
|
||||
|
||||
// 添加断言以检查函数的输出,例如:
|
||||
expectedResult := []string{"image3", "image4", image2.CmiiHarborPrefix + "image1", image2.CmiiHarborPrefix + "image2"}
|
||||
if len(result) != len(expectedResult) {
|
||||
@@ -232,9 +228,9 @@ func TestImageSyncEntity_PullFromEntityAndSyncConditionally(t *testing.T) {
|
||||
},
|
||||
DirectHarborHost: "36.134.71.138",
|
||||
}
|
||||
|
||||
|
||||
imageSyncResult := imageSyncEntity.PullFromEntityAndSyncConditionally()
|
||||
|
||||
|
||||
utils.BeautifulPrint(imageSyncResult)
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
bitnami/redis:6.2.14-debian-11-r1
|
||||
bitnami/mysql:8.1.0-debian-11-r42
|
||||
simonrupf/chronyd:0.4.3
|
||||
bitnami/bitnami-shell:11-debian-11-r136
|
||||
bitnami/rabbitmq:3.11.26-debian-11-r2
|
||||
ossrs/srs:v5.0.195
|
||||
emqx/emqx:5.5.1
|
||||
nacos/nacos-server:v2.1.2-slim
|
||||
mongo:5.0
|
||||
bitnami/minio:2023.5.4
|
||||
kubernetesui/dashboard:v2.0.1
|
||||
kubernetesui/metrics-scraper:v1.0.4
|
||||
nginx:1.24.0
|
||||
dyrnq/nfs-subdir-external-provisioner:v4.0.2
|
||||
jerrychina2020/rke-tools:v0.175-linux
|
||||
jerrychina2020/rke-tools:v0.175
|
||||
busybox:latest
|
||||
|
||||
@@ -1,25 +1,18 @@
|
||||
bitnami/redis:6.2.6-debian-10-r0
|
||||
bitnami/redis:6.2.14-debian-11-r1
|
||||
bitnami/mysql:8.0.35-debian-11-r1
|
||||
bitnami/mysql:8.1.0-debian-11-r42
|
||||
simonrupf/chronyd:0.4.3
|
||||
bitnami/bitnami-shell:10-debian-10-r140
|
||||
bitnami/bitnami-shell:11-debian-11-r136
|
||||
bitnami/rabbitmq:3.9.12-debian-10-r3
|
||||
bitnami/rabbitmq:3.11.26-debian-11-r2
|
||||
ossrs/srs:v4.0.136
|
||||
ossrs/srs:v5.0.195
|
||||
emqx/emqx:4.2.12
|
||||
emqx/emqx:5.5.1
|
||||
nacos/nacos-server:v2.1.2
|
||||
nacos/nacos-server:v2.1.2-slim
|
||||
mongo:5.0
|
||||
rabbitmq:3.9-management
|
||||
bitnami/minio:2022.5.4
|
||||
bitnami/minio:2023.5.4
|
||||
kubernetesui/dashboard:v2.0.1
|
||||
kubernetesui/metrics-scraper:v1.0.4
|
||||
nginx:1.21.3
|
||||
redis:6.0.20-alpine
|
||||
nginx:1.24.0
|
||||
dyrnq/nfs-subdir-external-provisioner:v4.0.2
|
||||
jerrychina2020/rke-tools:v0.175-linux
|
||||
jerrychina2020/rke-tools:v0.175
|
||||
busybox:latest
|
||||
|
||||
Reference in New Issue
Block a user