(agentID uuid.UUID, node *agpl.Node)
| 993 | } |
| 994 | |
| 995 | func (c *fakeCoordinator) agentNode(agentID uuid.UUID, node *agpl.Node) { |
| 996 | c.t.Helper() |
| 997 | pNode, err := agpl.NodeToProto(node) |
| 998 | require.NoError(c.t, err) |
| 999 | nodeRaw, err := gProto.Marshal(pNode) |
| 1000 | require.NoError(c.t, err) |
| 1001 | _, err = c.store.UpsertTailnetPeer(c.ctx, database.UpsertTailnetPeerParams{ |
| 1002 | ID: agentID, |
| 1003 | CoordinatorID: c.id, |
| 1004 | Node: nodeRaw, |
| 1005 | Status: database.TailnetStatusOk, |
| 1006 | }) |
| 1007 | require.NoError(c.t, err) |
| 1008 | err = c.ps.Publish("tailnet_peer_update", []byte(agentID.String())) |
| 1009 | require.NoError(c.t, err) |
| 1010 | } |
no test coverage detected