[Excution] - base function start -2

This commit is contained in:
IceDerce
2023-06-20 16:43:33 +08:00
parent 6f655a772d
commit 4bdd97ca73
5 changed files with 141 additions and 72 deletions

View File

@@ -3,19 +3,22 @@ package executor
import "testing"
var agentOP = AgentOsOperator{
InstallCommandPrefix: "apt-get install",
RemoveCommandPrefix: "apt-get remove",
CanAccessInternet: true,
IsOsTypeUbuntu: true,
IsAgentInnerWall: true,
InstallCommandPrefix: []string{
"apt-get", "install", "-y",
},
RemoveCommandPrefix: []string{"/usr/bin/apt", "remove", "-y"},
CanAccessInternet: true,
IsOsTypeUbuntu: true,
IsAgentInnerWall: true,
}
func TestBaseFunc(t *testing.T) {
agentOP.Exec("shutdownFirewall")
agentOP.Exec("modifyHostname")
agentOP.Exec("disableSwap")
//agentOP.Exec("shutdownFirewall")
//agentOP.Exec("modifyHostname")
//agentOP.Exec("disableSwap")
//agentOP.Exec("enableSwap")
//agentOP.Exec("removeDocker")
agentOP.Exec("installDocker")
agentOP.Exec("removeDocker")
}