Add pool presets, operator bake-ins, and USB pack improvements
- Pool preset checkboxes with failover in Calibrate and Forge - Tier 1/2 UX: setup banner, forge next worker, LAN defaults, blueprint prompt - USB: auto-install forge tools, seed config.json, sync LAUNCH.bat
This commit is contained in:
@@ -32,9 +32,15 @@ func TestDefaultConfigServerDefaults(t *testing.T) {
|
||||
if cfg.Port != 8989 {
|
||||
t.Fatalf("port default: got %d", cfg.Port)
|
||||
}
|
||||
if cfg.Pool.Host != "pool.supportxmr.com" || !cfg.Pool.UseTLS {
|
||||
if cfg.Pool.Host != "pool.supportxmr.com" || cfg.Pool.Port != 443 || !cfg.Pool.UseTLS {
|
||||
t.Fatalf("pool defaults wrong: %+v", cfg.Pool)
|
||||
}
|
||||
if len(cfg.Pool.BackupPools) < 2 {
|
||||
t.Fatalf("expected TLS backup pools, got %+v", cfg.Pool.BackupPools)
|
||||
}
|
||||
if cfg.Server.PublicURL != "" {
|
||||
t.Fatalf("public_url should default empty, got %q", cfg.Server.PublicURL)
|
||||
}
|
||||
if cfg.Server.StatsRetentionHours != 168 {
|
||||
t.Fatalf("stats retention default: got %d", cfg.Server.StatsRetentionHours)
|
||||
}
|
||||
@@ -83,6 +89,17 @@ func TestMergeConfigExplicitNestedServerPartialPreservesBooleans(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestMergeConfigExplicitAllowsBlankPublicURL(t *testing.T) {
|
||||
dst := DefaultConfig()
|
||||
dst.Server.PublicURL = "https://stale.example.com"
|
||||
|
||||
applyMergeFromJSON(t, dst, `{"server":{"public_url":""}}`)
|
||||
|
||||
if dst.Server.PublicURL != "" {
|
||||
t.Fatalf("explicit blank public_url must clear old value, got %q", dst.Server.PublicURL)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMergeConfigExplicitNestedPoolPartialPreservesUseTLS(t *testing.T) {
|
||||
dst := DefaultConfig()
|
||||
dst.Pool.UseTLS = true
|
||||
@@ -342,7 +359,7 @@ func TestLoadConfigExplicitOpenFirewallFalse(t *testing.T) {
|
||||
func TestPoolURLTLS(t *testing.T) {
|
||||
cfg := DefaultConfig()
|
||||
got := cfg.PoolURL()
|
||||
want := "stratum+ssl://pool.supportxmr.com:3333"
|
||||
want := "stratum+ssl://pool.supportxmr.com:443"
|
||||
if got != want {
|
||||
t.Fatalf("PoolURL TLS: got %q want %q", got, want)
|
||||
}
|
||||
@@ -351,6 +368,7 @@ func TestPoolURLTLS(t *testing.T) {
|
||||
func TestPoolURLPlainTCP(t *testing.T) {
|
||||
cfg := DefaultConfig()
|
||||
cfg.Pool.UseTLS = false
|
||||
cfg.Pool.Port = 3333
|
||||
got := cfg.PoolURL()
|
||||
want := "stratum+tcp://pool.supportxmr.com:3333"
|
||||
if got != want {
|
||||
|
||||
Reference in New Issue
Block a user