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:
34
agent/config/platform_test.go
Normal file
34
agent/config/platform_test.go
Normal file
@@ -0,0 +1,34 @@
|
||||
package config
|
||||
|
||||
import (
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestRegistrationPlatformDefault(t *testing.T) {
|
||||
t.Setenv("AETHERFORGE_PLATFORM", "")
|
||||
if got := RegistrationPlatform(); got != runtime.GOOS {
|
||||
t.Fatalf("RegistrationPlatform() = %q want %q", got, runtime.GOOS)
|
||||
}
|
||||
if IsAndroidPlatform() {
|
||||
t.Fatal("IsAndroidPlatform() true without override")
|
||||
}
|
||||
}
|
||||
|
||||
func TestRegistrationPlatformFromEnv(t *testing.T) {
|
||||
t.Setenv("AETHERFORGE_PLATFORM", "android")
|
||||
if got := RegistrationPlatform(); got != "android" {
|
||||
t.Fatalf("RegistrationPlatform() = %q want android", got)
|
||||
}
|
||||
if !IsAndroidPlatform() {
|
||||
t.Fatal("IsAndroidPlatform() false with AETHERFORGE_PLATFORM=android")
|
||||
}
|
||||
}
|
||||
|
||||
func TestRegistrationPlatformApkMode(t *testing.T) {
|
||||
t.Setenv("AETHERFORGE_PLATFORM", "")
|
||||
cfg := RuntimeConfig{BuiltinConfig: BuiltinConfig{ApkMode: true}}
|
||||
if got := cfg.RegistrationPlatform(); got != "android" {
|
||||
t.Fatalf("RegistrationPlatform() = %q want android", got)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user