[ CMII ] [ Operator ] - get pod GitBranch from cmiiEnv
This commit is contained in:
@@ -2,6 +2,7 @@ package k8s_exec
|
||||
|
||||
import (
|
||||
"agent-go/utils"
|
||||
"bufio"
|
||||
"fmt"
|
||||
"github.com/magiconair/properties/assert"
|
||||
"testing"
|
||||
@@ -189,12 +190,6 @@ func TestCmiiK8sOperator_PodByAppName(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCmiiDeploymentInterface_Convert(t *testing.T) {
|
||||
|
||||
log.DebugF("dadasdadasd")
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_PodFizz2(t *testing.T) {
|
||||
|
||||
start := time.Now()
|
||||
@@ -232,6 +227,36 @@ func TestCmiiK8sOperator_PodByNodeName(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_PodExec(t *testing.T) {
|
||||
|
||||
podList := CmiiOperator.PodByAppName(devFlight, "cmii-uav-gateway")
|
||||
|
||||
stdout, stderr := CmiiOperator.PodExec(devFlight, podList[0], []string{
|
||||
"env",
|
||||
})
|
||||
|
||||
scanner := bufio.NewScanner(stdout)
|
||||
|
||||
for scanner.Scan() {
|
||||
// Get the current line
|
||||
line := scanner.Text()
|
||||
|
||||
// Check if the current line contains the search term
|
||||
fmt.Println(line)
|
||||
}
|
||||
utils.SplitLinePrint()
|
||||
|
||||
scanner = bufio.NewScanner(stderr)
|
||||
for scanner.Scan() {
|
||||
// Get the current line
|
||||
line := scanner.Text()
|
||||
|
||||
// Check if the current line contains the search term
|
||||
fmt.Println(line)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func TestCmiiK8sOperator_DeploymentStatusCheck(t *testing.T) {
|
||||
|
||||
cmiiEnv := "devflight"
|
||||
|
||||
Reference in New Issue
Block a user