[ Agent ] [ CMII ] - 新增大量功能 - 1

This commit is contained in:
zeaslity
2024-01-10 16:45:41 +08:00
parent 7ce838289b
commit bc231b0866
6 changed files with 251 additions and 345 deletions

View File

@@ -6,9 +6,10 @@ import (
"testing"
)
func TestFindDeploymentRestartCountGreaterThanN(t *testing.T) {
func TestFindAppNotHealthyOrRestartCountGreaterThanN(t *testing.T) {
deploymentRestartCountGreaterThanN := FindDeploymentRestartCountGreaterThanN("devflight", 10)
deploymentRestartCountGreaterThanN := FindAppNotHealthyOrRestartCountGreaterThanN("devflight", 10)
deploymentRestartCountGreaterThanN = FilterAllCmiiAppSoft(deploymentRestartCountGreaterThanN)
for _, deploymentInterface := range deploymentRestartCountGreaterThanN {
println()
@@ -57,3 +58,17 @@ func TestRollBackCmiiDeploymentFromUpdateLog(t *testing.T) {
assert.Equal(t, updateLog, true, "roll back from update log failed !")
}
func TestRestartCmiiBackendDeployment(t *testing.T) {
RestartCmiiBackendDeployment("devflight")
}
func TestFindDeploymentNotHealthy(t *testing.T) {
notHealthy := FindDeploymentNotHealthy("devflight")
notHealthy = FilterAllCmiiAppSoft(notHealthy)
for _, deploymentInterface := range notHealthy {
utils.BeautifulPrint(deploymentInterface)
}
}