handle agent worker jwt (#3668)

* handle agent worker jwt

* test

* tidy

* tidy

* deps
This commit is contained in:
Paul Wells
2025-05-15 08:23:10 -07:00
committed by GitHub
parent 3b359d8b74
commit c9385edd1e
7 changed files with 75 additions and 33 deletions
+2 -2
View File
@@ -27,7 +27,7 @@ import (
)
type AgentService interface {
HandleConnection(context.Context, agent.SignalConn, agent.WorkerProtocolVersion)
HandleConnection(context.Context, agent.SignalConn, agent.WorkerRegistration)
DrainConnections(time.Duration)
}
@@ -126,7 +126,7 @@ func (h *TestServer) SimulateAgentWorker(opts ...SimulatedWorkerOption) *AgentWo
}
ctx := service.WithAPIKey(o.Context, &auth.ClaimGrants{}, "test")
go h.HandleConnection(ctx, w, agent.CurrentProtocol)
go h.HandleConnection(ctx, w, agent.MakeWorkerRegistration())
return w
}