[ Executor ] exec function - 1

This commit is contained in:
zeaslity
2023-06-20 14:22:24 +08:00
parent a96d3e51ac
commit 6f655a772d
4 changed files with 275 additions and 136 deletions

View File

@@ -0,0 +1,21 @@
package executor
import "testing"
var agentOP = AgentOsOperator{
InstallCommandPrefix: "apt-get install",
RemoveCommandPrefix: "apt-get remove",
CanAccessInternet: true,
IsOsTypeUbuntu: true,
IsAgentInnerWall: true,
}
func TestBaseFunc(t *testing.T) {
agentOP.Exec("shutdownFirewall")
agentOP.Exec("modifyHostname")
agentOP.Exec("disableSwap")
agentOP.Exec("installDocker")
agentOP.Exec("removeDocker")
}