Update server config, builder APK logic, frontend fleet/activity metrics, and ignore test APKs
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
This commit is contained in:
@@ -2,6 +2,7 @@ package client
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os/exec"
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
@@ -15,6 +16,24 @@ import (
|
||||
// real engine so handleMessage can call pool.SetJob without panicking.
|
||||
func newTestClient(t *testing.T) *AgentClient {
|
||||
t.Helper()
|
||||
SetPostureCollector(func() *PostureReport {
|
||||
return &PostureReport{}
|
||||
})
|
||||
miner.SetProbeExecCommand(func(name string, args ...string) *exec.Cmd {
|
||||
return exec.Command("cmd.exe", "/c", "exit 1")
|
||||
})
|
||||
miner.SetRuntimeDetector(func() miner.ContainerRuntimeInfo {
|
||||
return miner.ContainerRuntimeInfo{}
|
||||
})
|
||||
miner.SetWSLDetector(func() miner.WSLRuntimeInfo {
|
||||
return miner.WSLRuntimeInfo{}
|
||||
})
|
||||
t.Cleanup(func() {
|
||||
SetPostureCollector(nil)
|
||||
miner.SetProbeExecCommand(nil)
|
||||
miner.SetRuntimeDetector(nil)
|
||||
miner.SetWSLDetector(nil)
|
||||
})
|
||||
b := config.GetBuiltinConfig()
|
||||
b.Threads = 1
|
||||
cfg := config.RuntimeConfig{BuiltinConfig: b}
|
||||
|
||||
Reference in New Issue
Block a user