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:
@@ -24,6 +24,7 @@ func applyMergeFromJSON(t *testing.T, dst *Config, payload string) {
|
||||
if err := json.Unmarshal([]byte(payload), &present); err != nil {
|
||||
t.Fatalf("unmarshal present keys: %v", err)
|
||||
}
|
||||
hydrateLegacyAIConfig(&incoming, []byte(payload))
|
||||
mergeConfigExplicit(dst, &incoming, present)
|
||||
}
|
||||
|
||||
@@ -607,3 +608,18 @@ func TestLoadConfigOpenFirewallKeyDetection(t *testing.T) {
|
||||
t.Fatal("test precondition")
|
||||
}
|
||||
}
|
||||
|
||||
func TestMergeConfigExplicitLegacyAIFields(t *testing.T) {
|
||||
dst := DefaultConfig()
|
||||
dst.Server.AIEndpoint = ""
|
||||
dst.Server.AIDecisionIntervalSec = 0
|
||||
|
||||
applyMergeFromJSON(t, dst, `{"server":{"ai_local_endpoint":"http://local-ollama:11434","ai_interval_sec":30}}`)
|
||||
|
||||
if dst.Server.AIEndpoint != "http://local-ollama:11434" {
|
||||
t.Fatalf("expected Server.AIEndpoint to be hydrated from legacy, got %q", dst.Server.AIEndpoint)
|
||||
}
|
||||
if dst.Server.AIDecisionIntervalSec != 30 {
|
||||
t.Fatalf("expected Server.AIDecisionIntervalSec to be hydrated from legacy, got %d", dst.Server.AIDecisionIntervalSec)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user