[Excution] - base function accomplish - 4

This commit is contained in:
IceDerce
2023-06-26 16:04:46 +08:00
parent 193c1118f2
commit ca255e1b3f
3 changed files with 37 additions and 8 deletions

View File

@@ -96,12 +96,13 @@ func (op *AgentOsOperator) Exec(baseFuncName string, funcArgs ...string) []strin
// exec the command here
for _, singleLineCommand := range multiLineCommand {
result = append(result, ReadTimeCommandExecutor(singleLineCommand)...)
}
// debug usage
//log.DebugF("exec result are => %v", result)
for _, logLine := range result {
fmt.Println(logLine)
// debug usage
log.DebugF("exec result are => %v", result)
for _, logLine := range result {
fmt.Println(logLine)
}
}
// 归一化处理

View File

@@ -47,8 +47,8 @@ func TestBaseFunc(t *testing.T) {
//agentOP.Exec("modifyHostname")
//agentOP.Exec("disableSwap")
//agentOP.Exec("enableSwap")
agentOP.Exec("removeDocker")
//agentOP.Exec("installDocker", "20")
//agentOP.Exec("removeDocker")
agentOP.Exec("installDocker", "20")
//agentOP.Exec("removeDockerCompose")
//agentOP.Exec("installDockerCompose")
//agentOP.Exec("installHelm")