[ Agent ] [ CMII ] - 新增Deployment的Kill更新模式
This commit is contained in:
@@ -53,7 +53,7 @@ func TestCmiiK8sOperator_DeploymentAllInterface(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentFizz(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
deploymentFizz := CmiiOperator.DeploymentFizz("demo", "helm-proxysql")
|
||||
deploymentFizz := CmiiOperator.DeploymentFizz("int", "cmii-suav-supervision")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -61,10 +61,10 @@ func TestCmiiK8sOperator_DeploymentFizz(t *testing.T) {
|
||||
|
||||
cmiiDeploymentInterface := CmiiDeploymentInterface{}
|
||||
for _, pod := range deploymentFizz {
|
||||
utils.BeautifulPrint(pod)
|
||||
|
||||
convert := cmiiDeploymentInterface.Convert(pod)
|
||||
utils.BeautifulPrint(convert)
|
||||
|
||||
utils.BeautifulPrint(pod)
|
||||
}
|
||||
|
||||
// elastic search
|
||||
@@ -88,10 +88,19 @@ func TestCmiiK8sOperator_DeploymentUpdateTag(t *testing.T) {
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
}
|
||||
|
||||
func TestDeploymentRestart(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentRestart(t *testing.T) {
|
||||
CmiiOperator.DeploymentRestart("int", "cmii-uav-user")
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_DeploymentRestartByKill(t *testing.T) {
|
||||
cmiiEnv := "int"
|
||||
appName := "cmii-suav-supervision"
|
||||
|
||||
kill := CmiiOperator.DeploymentRestartByKill(cmiiEnv, appName)
|
||||
assert.Equal(t, kill, true, "deployment restart by kill failed !")
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_DeploymentOneInterface(t *testing.T) {
|
||||
start := time.Now()
|
||||
deploy := CmiiOperator.DeploymentOneInterface("devflight", "cmii-uav-depotautoreturn")
|
||||
@@ -156,10 +165,10 @@ func TestCmiiK8sOperator_PodFizz(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_PodByAppName(t *testing.T) {
|
||||
cmiiEnv := "uavcloud-devflight"
|
||||
nodeName := "dev-01.ecs.io"
|
||||
cmiiEnv := "uat"
|
||||
appName := "cmii-admin-data"
|
||||
|
||||
exists := CmiiOperator.PodByNodeName(cmiiEnv, nodeName)
|
||||
exists := CmiiOperator.PodByNodeName(cmiiEnv, appName)
|
||||
|
||||
for _, podInterface := range exists {
|
||||
utils.BeautifulPrint(podInterface)
|
||||
@@ -193,13 +202,19 @@ func TestCmiiK8sOperator_PodFizz2(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_PodByNodeName(t *testing.T) {
|
||||
cmiiEnv := "uavcloud-devflight"
|
||||
appName := "cmii-admin-data"
|
||||
|
||||
exists := CmiiOperator.PodByAppName(cmiiEnv, appName)
|
||||
cmiiEnv := "uat"
|
||||
nodeName := "test-03.ecs.io"
|
||||
|
||||
exists := CmiiOperator.PodByNodeName(cmiiEnv, nodeName)
|
||||
exists = FilterAllCmiiPodSoft(exists)
|
||||
for _, podInterface := range exists {
|
||||
utils.BeautifulPrint(podInterface)
|
||||
|
||||
if !podInterface.PodStatus {
|
||||
podDelete := CmiiOperator.PodDelete(podInterface.Namespace, podInterface.Name)
|
||||
assert.Equal(t, podDelete, true, "delete pod failed !")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user