(t *testing.T, mutations ...func([]*proto.Agent) []*proto.Agent)
| 60 | ) |
| 61 | |
| 62 | func setupWorkspaceForAgent(t *testing.T, mutations ...func([]*proto.Agent) []*proto.Agent) (*codersdk.Client, database.WorkspaceTable, string) { |
| 63 | t.Helper() |
| 64 | |
| 65 | client, store := coderdtest.NewWithDatabase(t, nil) |
| 66 | client.SetLogger(testutil.Logger(t).Named("client")) |
| 67 | first := coderdtest.CreateFirstUser(t, client) |
| 68 | userClient, user := coderdtest.CreateAnotherUserMutators(t, client, first.OrganizationID, nil, func(r *codersdk.CreateUserRequestWithOrgs) { |
| 69 | r.Username = "myuser" |
| 70 | }) |
| 71 | r := dbfake.WorkspaceBuild(t, store, database.WorkspaceTable{ |
| 72 | Name: "myworkspace", |
| 73 | OrganizationID: first.OrganizationID, |
| 74 | OwnerID: user.ID, |
| 75 | }).WithAgent(mutations...).Do() |
| 76 | |
| 77 | return userClient, r.Workspace, r.AgentToken |
| 78 | } |
| 79 | |
| 80 | func TestSSH(t *testing.T) { |
| 81 | t.Parallel() |
no test coverage detected