[CMII] [Operator] accomplish - 1

This commit is contained in:
zeaslity
2024-01-24 13:53:05 +08:00
parent 4a6b11e345
commit 8d4e304237
21 changed files with 1148 additions and 78 deletions

View File

@@ -2,9 +2,9 @@ package cmii_operator
import (
"fmt"
"github.com/magiconair/properties/assert"
"testing"
"time"
"wdd.io/agent-go/assert"
"wdd.io/agent-go/utils"
)
@@ -78,6 +78,17 @@ func TestRestartCmiiFrontendDeployment(t *testing.T) {
RestartCmiiFrontendDeployment("dev")
}
func TestRestartCmiiDeployment(t *testing.T) {
cmiiEnv := integration
appName := "cmii-uav-cloud-live"
kill := CmiiOperator.DeploymentRestartByKill(cmiiEnv, appName)
assert.Equal(t, kill, true, "have unhealthy pod !")
check := CmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
assert.Equal(t, check, true, "DeploymentStatusCheck failed !")
}
func TestFindDeploymentNotHealthy(t *testing.T) {
for _, devNamespace := range CmiiDevNamespaceList {