mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: Allow workspace resources to attach multiple agents (#942)
This enables a "kubernetes_pod" to attach multiple agents that could be for multiple services. Each agent is required to have a unique name, so SSH syntax is: `coder ssh <workspace>.<agent>` A resource can have zero agents too, they aren't required.
This commit is contained in:
@ -210,10 +210,10 @@ func TestTemplateVersionResources(t *testing.T) {
|
||||
Resources: []*proto.Resource{{
|
||||
Name: "some",
|
||||
Type: "example",
|
||||
Agent: &proto.Agent{
|
||||
Agents: []*proto.Agent{{
|
||||
Id: "something",
|
||||
Auth: &proto.Agent_Token{},
|
||||
},
|
||||
}},
|
||||
}, {
|
||||
Name: "another",
|
||||
Type: "example",
|
||||
@ -229,7 +229,7 @@ func TestTemplateVersionResources(t *testing.T) {
|
||||
require.Len(t, resources, 4)
|
||||
require.Equal(t, "some", resources[0].Name)
|
||||
require.Equal(t, "example", resources[0].Type)
|
||||
require.NotNil(t, resources[0].Agent)
|
||||
require.Len(t, resources[0].Agents, 1)
|
||||
})
|
||||
}
|
||||
|
||||
@ -255,12 +255,12 @@ func TestTemplateVersionLogs(t *testing.T) {
|
||||
Resources: []*proto.Resource{{
|
||||
Name: "some",
|
||||
Type: "example",
|
||||
Agent: &proto.Agent{
|
||||
Agents: []*proto.Agent{{
|
||||
Id: "something",
|
||||
Auth: &proto.Agent_Token{
|
||||
Token: uuid.NewString(),
|
||||
},
|
||||
},
|
||||
}},
|
||||
}, {
|
||||
Name: "another",
|
||||
Type: "example",
|
||||
|
Reference in New Issue
Block a user