Add Android APK fleet nodes with Crucible UI integration and tests.
APK wrapper registers platform=android via AETHERFORGE_PLATFORM; fleet UI shows robot icons, Android Access Depth probes, and a shortened mining onion timeline.
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"testing"
|
||||
|
||||
"crypto-miner-agent/config"
|
||||
"crypto-miner-agent/job"
|
||||
)
|
||||
|
||||
@@ -45,6 +46,19 @@ func TestAuthPayloadJSONRoundTrip(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestAuthPayloadPlatformFromEnv(t *testing.T) {
|
||||
t.Setenv("AETHERFORGE_PLATFORM", "android")
|
||||
if got := config.RegistrationPlatform(); got != "android" {
|
||||
t.Fatalf("RegistrationPlatform() = %q want android", got)
|
||||
}
|
||||
in := AuthPayload{Platform: config.RegistrationPlatform(), Arch: "arm64"}
|
||||
var out AuthPayload
|
||||
roundTrip(t, in, &out)
|
||||
if out.Platform != "android" {
|
||||
t.Fatalf("auth platform = %q want android", out.Platform)
|
||||
}
|
||||
}
|
||||
|
||||
func TestAuthResponseJSONRoundTrip(t *testing.T) {
|
||||
in := AuthResponse{Success: true, AgentID: "a1", Error: ""}
|
||||
var out AuthResponse
|
||||
|
||||
Reference in New Issue
Block a user