feat(store): persist the Swarm cluster id of each agent
The Ledger UI groups Swarm services under their cluster and lists the cluster's managers, so the master needs to know which cluster an agent belongs to. RecordHello now stores hello.SwarmClusterID in the new agents.swarm_cluster_id column. Claude-Session: https://claude.ai/code/session_01GAZsp3P7Qto6JnhipxWUJQ
This commit is contained in:
@@ -80,6 +80,7 @@ func TestAgents_RecordHelloAndMarkSeen(t *testing.T) {
|
||||
assert.Equal(t, "swarm-mgr", agents[0].Hostname)
|
||||
assert.Equal(t, "v1", agents[0].AgentVersion)
|
||||
assert.True(t, agents[0].SwarmManager)
|
||||
assert.Equal(t, "c1", agents[0].SwarmClusterID)
|
||||
require.NotNil(t, agents[0].LastSeenAt)
|
||||
assert.True(t, agents[0].LastSeenAt.Equal(at.Add(time.Minute)))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user