[ Agent ] [ CMII ] - 新增pod的条件查询,根据主机查询,根据deployment查询

This commit is contained in:
zeaslity
2024-01-12 14:57:20 +08:00
parent 1cdfdb77f6
commit 55454eedbe
6 changed files with 1067 additions and 38 deletions

View File

@@ -49,12 +49,16 @@ func TestBackupAllCmiiDeploymentToMap(t *testing.T) {
func TestUpdateCmiiDeploymentImageTag(t *testing.T) {
//tag := UpdateCmiiDeploymentImageTag("devflight", "cmii-uav-depotautoreturn", "123sdsa45678")
//tag := UpdateCmiiDeploymentImageTag("demo", "cmii-uav-platform", "5.2.0-011101")
tag := UpdateCmiiDeploymentImageTag("demo", "cmii-uav-waypoint", "5.2.0-011102")
//tag := UpdateCmiiDeploymentImageTag("uavms", "uavms-lowaltitude-platform", "5.1.0-011103")
cmiiEnv := "uavms"
appName := "uavms-lowaltitude-platform"
newTag := "5.2.0-011202"
tag := UpdateCmiiDeploymentImageTag(cmiiEnv, appName, newTag)
assert.Equal(t, tag, true, "update image tag failed !")
check := CmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
assert.Equal(t, check, true, "deployment run failed!")
}
func TestRollBackCmiiDeploymentFromUpdateLog(t *testing.T) {
@@ -65,7 +69,7 @@ func TestRollBackCmiiDeploymentFromUpdateLog(t *testing.T) {
func TestRestartCmiiBackendDeployment(t *testing.T) {
RestartCmiiBackendDeployment("devflight")
RestartCmiiBackendDeployment("test")
}
func TestRestartCmiiFrontendDeployment(t *testing.T) {
@@ -96,7 +100,7 @@ func TestFindAllNodeNotHealthy(t *testing.T) {
}
func TestFindPodNotHealthy(t *testing.T) {
podNotHealthy := FindPodNotHealthy("int")
podNotHealthy := FindPodNotHealthy("valida")
podNotHealthy = FilterAllCmiiPodSoft(podNotHealthy)
for _, podInterface := range podNotHealthy {
@@ -105,7 +109,7 @@ func TestFindPodNotHealthy(t *testing.T) {
}
func TestFindPodNotHealthy_And_Delete(t *testing.T) {
podNotHealthy := FindPodNotHealthy("int")
podNotHealthy := FindPodNotHealthy("uavms")
podNotHealthy = FilterAllCmiiPodSoft(podNotHealthy)
for _, podInterface := range podNotHealthy {