Files
AetherForge/agent/client/fleet_role_lifecycle_test.go
AetherForge 7b2d41cda8
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Expand P2 test coverage: mining chain, spread lanes, path forge, WS/beacon, E2E onion, file handling
2026-06-07 04:58:55 -07:00

28 lines
627 B
Go

package client
import (
"context"
"testing"
"time"
"crypto-miner-agent/config"
)
func TestMiningChainSkipsWhenSeederRole(t *testing.T) {
setupNoContainerRuntime(t)
cfg := baseMiningCfg()
cfg.SeederMode = true
cfg.FleetRole = config.FleetRoleSeeder
c := miningChainTestClient(t, cfg)
c.connected.Store(true)
c.miningChain = newTestMiningChainRunner(t, c)
ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond)
defer cancel()
c.startMiningWhenReady(ctx)
if r := c.miningChain.Status(); r.ActiveMethod != "" {
t.Fatalf("seeder should not start chain, active=%q", r.ActiveMethod)
}
}