testing/merge fixes

This commit is contained in:
redanthrax 2022-06-24 11:23:07 -07:00
parent 29e304fa4e
commit 0d2e1a76a2
4 changed files with 20 additions and 6 deletions

View file

@ -142,7 +142,7 @@ func (a *Agent) Install(i *Installer) {
if len(i.MeshDir) > 0 {
installerMeshSystemEXE = filepath.Join(i.MeshDir, "MeshAgent.exe")
} else {
installerMeshSystemEXE = a.MeshSystemEXE
installerMeshSystemEXE = a.MeshSystemBin
}
var meshNodeID string

View file

@ -24,7 +24,6 @@ func init() {
restyC.SetCloseConnection(true)
restyC.SetHeaders(headers)
restyC.SetTimeout(15 * time.Second)
restyC.SetDebug(shared.DEBUG)
if len(ac.Proxy) > 0 {
restyC.SetProxy(ac.Proxy)

19
agent/testargs.json Normal file
View file

@ -0,0 +1,19 @@
{
"api": "http://api.hothcorp.com:8000",
"clientid": 1,
"siteid": 1,
"description": "",
"agenttype": "workstation",
"power": false,
"rdp": false,
"ping": false,
"token": "e27883a248ab900724daf6ed578b38215f08b0f3edb224a7eaef7cbd0062fd3f",
"localmesh": "",
"cert": "",
"proxy": "",
"timeout": 30,
"silent": true,
"nomesh": true,
"meshdir": "",
"meshnodeid": ""
}

View file

@ -77,10 +77,6 @@ func WebRequest(requestType string, timeout time.Duration, payload map[string]st
client := resty.New()
client.SetTimeout(timeout * time.Second)
client.SetCloseConnection(true)
if shared.DEBUG {
client.SetDebug(true)
}
result, err := client.R().Get(url)
return *result, err
}