[Excution] - base function start - 3

This commit is contained in:
IceDerce
2023-06-25 11:26:33 +08:00
parent 6ce6e5f0d3
commit fb38ab8f15
7 changed files with 136 additions and 48 deletions

View File

@@ -1,6 +1,9 @@
package executor
import "testing"
import (
"agent-go/register"
"testing"
)
var agentOP = AgentOsOperator{
InstallCommandPrefix: []string{
@@ -12,6 +15,30 @@ var agentOP = AgentOsOperator{
IsAgentInnerWall: true,
AgentArch: "amd64",
AgentOSReleaseCode: "focal",
AgentServerInfo: register.AgentServerInfo{
ServerName: "",
ServerIPPbV4: "",
ServerIPInV4: "192.168.0.8",
ServerIPPbV6: "",
ServerIPInV6: "",
Location: "",
Provider: "",
ManagePort: "",
CPUCore: "",
CPUBrand: "",
OSInfo: "",
OSKernelInfo: "",
TCPControl: "",
Virtualization: "",
IoSpeed: "",
MemoryTotal: "",
DiskTotal: "",
DiskUsage: "",
Comment: "",
MachineID: "",
AgentVersion: "",
TopicName: "",
},
}
func TestBaseFunc(t *testing.T) {
@@ -22,11 +49,12 @@ func TestBaseFunc(t *testing.T) {
//agentOP.Exec("enableSwap")
//agentOP.Exec("removeDocker")
//agentOP.Exec("installDocker", "20")
agentOP.Exec("installDockerCompose")
agentOP.Exec("installHelm")
agentOP.Exec("installHarbor")
agentOP.Exec("chronyToPublicNTP")
agentOP.Exec("chronyToMaster", "192.168.0.8")
//agentOP.Exec("removeDockerCompose")
//agentOP.Exec("installDockerCompose")
//agentOP.Exec("installHelm")
//agentOP.Exec("installHarbor")
//agentOP.Exec("chronyToPublicNTP")
//agentOP.Exec("chronyToMaster", "192.168.0.8")
agentOP.Exec("installZSH")
}