[agent-operator] - update dltu part
This commit is contained in:
@@ -12,7 +12,7 @@ import (
|
||||
func TestCmiiK8sOperator_DeploymentAll(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
deploymentList := CmiiOperator.DeploymentAll("devflight")
|
||||
deploymentList := DefaultCmiiOperator.DeploymentAll("devflight")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -39,7 +39,7 @@ func TestCmiiK8sOperator_DeploymentAll(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentAllInterface(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
deploymentList := CmiiOperator.DeploymentAllInterface("devflight")
|
||||
deploymentList := DefaultCmiiOperator.DeploymentAllInterface("devflight")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -54,7 +54,7 @@ func TestCmiiK8sOperator_DeploymentAllInterface(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentFizz(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
deploymentFizz := CmiiOperator.DeploymentFizz("int", "cmii-suav-supervision")
|
||||
deploymentFizz := DefaultCmiiOperator.DeploymentFizz("int", "cmii-suav-supervision")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -75,7 +75,7 @@ func TestCmiiK8sOperator_DeploymentFizz(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentScale(t *testing.T) {
|
||||
start := time.Now()
|
||||
|
||||
CmiiOperator.DeploymentScale(demo, "cmii-uav-industrial-portfolio", 1)
|
||||
DefaultCmiiOperator.DeploymentScale(demo, "cmii-uav-industrial-portfolio", 1)
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -84,7 +84,7 @@ func TestCmiiK8sOperator_DeploymentScale(t *testing.T) {
|
||||
func TestCmiiK8sOperator_DeploymentUpdateTag(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
CmiiOperator.DeploymentUpdateTag("demo", "cmii-uav-platform", "5.2.0-011001")
|
||||
DefaultCmiiOperator.DeploymentUpdateTag("demo", "cmii-uav-platform", "5.2.0-011001")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
}
|
||||
@@ -94,11 +94,11 @@ func TestCmiiK8sOperator_DeploymentRestart(t *testing.T) {
|
||||
cmiiEnv := integration
|
||||
appName := "cmii-uav-data-post-process"
|
||||
|
||||
CmiiOperator.DeploymentRestart(cmiiEnv, appName)
|
||||
DefaultCmiiOperator.DeploymentRestart(cmiiEnv, appName)
|
||||
|
||||
utils.SplitLinePrint()
|
||||
|
||||
check := CmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
check := DefaultCmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
assert.Equal(t, check, true, "deployment run failed!")
|
||||
}
|
||||
|
||||
@@ -106,19 +106,19 @@ func TestCmiiK8sOperator_DeploymentRestartByKill(t *testing.T) {
|
||||
cmiiEnv := "demo"
|
||||
appName := "cmii-uav-platform"
|
||||
|
||||
kill := CmiiOperator.DeploymentRestartByKill(cmiiEnv, appName)
|
||||
kill := DefaultCmiiOperator.DeploymentRestartByKill(cmiiEnv, appName)
|
||||
assert.Equal(t, kill, true, "deployment restart by kill failed !")
|
||||
|
||||
utils.SplitLinePrint()
|
||||
|
||||
check := CmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
check := DefaultCmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
assert.Equal(t, check, true, "deployment run failed!")
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_DeploymentOneInterface(t *testing.T) {
|
||||
start := time.Now()
|
||||
deploy := CmiiOperator.DeploymentOneInterface("devflight", "cmii-uav-depotautoreturn")
|
||||
deploy := DefaultCmiiOperator.DeploymentOneInterface("devflight", "cmii-uav-depotautoreturn")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -130,7 +130,7 @@ func TestCmiiK8sOperator_ReplicaSetExists(t *testing.T) {
|
||||
cmiiEnv := "uavcloud-devflight"
|
||||
appName := "cmii-admin-data-bf8f87cb7"
|
||||
|
||||
exists := CmiiOperator.ReplicaSetExists(cmiiEnv, appName)
|
||||
exists := DefaultCmiiOperator.ReplicaSetExists(cmiiEnv, appName)
|
||||
|
||||
utils.BeautifulPrint(*exists)
|
||||
}
|
||||
@@ -140,7 +140,7 @@ func TestCmiiK8sOperator_ReplicaSetByAppName(t *testing.T) {
|
||||
cmiiEnv := "uavcloud-devflight"
|
||||
appName := "cmii-admin-data"
|
||||
|
||||
exists := CmiiOperator.ReplicaSetByAppName(cmiiEnv, appName)
|
||||
exists := DefaultCmiiOperator.ReplicaSetByAppName(cmiiEnv, appName)
|
||||
|
||||
for _, replicaSet := range exists {
|
||||
utils.BeautifulPrint(replicaSet)
|
||||
@@ -149,7 +149,7 @@ func TestCmiiK8sOperator_ReplicaSetByAppName(t *testing.T) {
|
||||
|
||||
func TestCmiiK8sOperator_PodAll(t *testing.T) {
|
||||
start := time.Now()
|
||||
podList := CmiiOperator.PodAll("devflight")
|
||||
podList := DefaultCmiiOperator.PodAll("devflight")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -163,7 +163,7 @@ func TestCmiiK8sOperator_PodAll(t *testing.T) {
|
||||
|
||||
func TestCmiiK8sOperator_PodFizz(t *testing.T) {
|
||||
start := time.Now()
|
||||
podList := CmiiOperator.PodFizz("devflight", "cmii-uav-data-post-process")
|
||||
podList := DefaultCmiiOperator.PodFizz("devflight", "cmii-uav-data-post-process")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
t.Logf("pod list lenght is => %d", len(podList))
|
||||
@@ -183,7 +183,7 @@ func TestCmiiK8sOperator_PodByAppName(t *testing.T) {
|
||||
cmiiEnv := "uat"
|
||||
appName := "cmii-admin-data"
|
||||
|
||||
exists := CmiiOperator.PodByNodeName(cmiiEnv, appName)
|
||||
exists := DefaultCmiiOperator.PodByNodeName(cmiiEnv, appName)
|
||||
|
||||
for _, podInterface := range exists {
|
||||
utils.BeautifulPrint(podInterface)
|
||||
@@ -193,7 +193,7 @@ func TestCmiiK8sOperator_PodByAppName(t *testing.T) {
|
||||
func TestCmiiK8sOperator_PodFizz2(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
podList := CmiiOperator.PodFizz("devflight", "notice")
|
||||
podList := DefaultCmiiOperator.PodFizz("devflight", "notice")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
t.Logf("pod list lenght is => %d", len(podList))
|
||||
@@ -215,13 +215,13 @@ func TestCmiiK8sOperator_PodByNodeName(t *testing.T) {
|
||||
cmiiEnv := "uat"
|
||||
nodeName := "test-03.ecs.io"
|
||||
|
||||
exists := CmiiOperator.PodByNodeName(cmiiEnv, nodeName)
|
||||
exists := DefaultCmiiOperator.PodByNodeName(cmiiEnv, nodeName)
|
||||
exists = FilterAllCmiiPodSoft(exists)
|
||||
for _, podInterface := range exists {
|
||||
utils.BeautifulPrint(podInterface)
|
||||
|
||||
if !podInterface.PodStatus {
|
||||
podDelete := CmiiOperator.PodDelete(podInterface.Namespace, podInterface.Name)
|
||||
podDelete := DefaultCmiiOperator.PodDelete(podInterface.Namespace, podInterface.Name)
|
||||
assert.Equal(t, podDelete, true, "delete pod failed !")
|
||||
}
|
||||
}
|
||||
@@ -229,9 +229,9 @@ func TestCmiiK8sOperator_PodByNodeName(t *testing.T) {
|
||||
|
||||
func TestCmiiK8sOperator_PodExec(t *testing.T) {
|
||||
|
||||
podList := CmiiOperator.PodByAppName(devFlight, "cmii-uav-gateway")
|
||||
podList := DefaultCmiiOperator.PodByAppName(devFlight, "cmii-uav-gateway")
|
||||
|
||||
stdout, stderr := CmiiOperator.PodExec(devFlight, podList[0], []string{
|
||||
stdout, stderr := DefaultCmiiOperator.PodExec(devFlight, podList[0], []string{
|
||||
"env",
|
||||
})
|
||||
|
||||
@@ -262,14 +262,14 @@ func TestCmiiK8sOperator_DeploymentStatusCheck(t *testing.T) {
|
||||
cmiiEnv := "devflight"
|
||||
appName := "cmii-uav-gateway"
|
||||
|
||||
check := CmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
check := DefaultCmiiOperator.DeploymentStatusCheck(cmiiEnv, appName, 180)
|
||||
assert.Equal(t, check, true, "deployment run failed!")
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_NodeAll(t *testing.T) {
|
||||
start := time.Now()
|
||||
nodeList := CmiiOperator.NodeAll("dev")
|
||||
nodeList := DefaultCmiiOperator.NodeAll("dev")
|
||||
elapsed := time.Since(start).Milliseconds()
|
||||
fmt.Printf("执行耗时: %d ms\n", elapsed)
|
||||
|
||||
@@ -282,7 +282,7 @@ func TestCmiiK8sOperator_NodeAll(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_NodeAllInterface(t *testing.T) {
|
||||
cmiiNodeInterfaces := CmiiOperator.NodeAllInterface("uat")
|
||||
cmiiNodeInterfaces := DefaultCmiiOperator.NodeAllInterface("uat")
|
||||
|
||||
for _, nodeInterface := range cmiiNodeInterfaces {
|
||||
println()
|
||||
|
||||
Reference in New Issue
Block a user