MCPcopy Index your code
hub / github.com/coder/coder / buildWorkspaceWithAgent

Function buildWorkspaceWithAgent

coderd/workspaceagents_test.go:3161–3176  ·  view source on GitHub ↗
(
	t *testing.T,
	client *codersdk.Client,
	orgID uuid.UUID,
	ownerID uuid.UUID,
	db database.Store,
	ps pubsub.Pubsub,
)

Source from the content-addressed store, hash-verified

3159}
3160
3161func buildWorkspaceWithAgent(
3162 t *testing.T,
3163 client *codersdk.Client,
3164 orgID uuid.UUID,
3165 ownerID uuid.UUID,
3166 db database.Store,
3167 ps pubsub.Pubsub,
3168) database.WorkspaceTable {
3169 r := dbfake.WorkspaceBuild(t, db, database.WorkspaceTable{
3170 OrganizationID: orgID,
3171 OwnerID: ownerID,
3172 }).WithAgent().Pubsub(ps).Do()
3173 _ = agenttest.New(t, client.URL, r.AgentToken)
3174 coderdtest.NewWorkspaceAgentWaiter(t, client, r.Workspace.ID).Wait()
3175 return r.Workspace
3176}
3177
3178func requireGetManifest(ctx context.Context, t testing.TB, aAPI agentproto.DRPCAgentClient) agentsdk.Manifest {
3179 mp, err := aAPI.GetManifest(ctx, &agentproto.GetManifestRequest{})

Callers 1

Calls 7

WorkspaceBuildFunction · 0.92
NewFunction · 0.92
NewWorkspaceAgentWaiterFunction · 0.92
WithAgentMethod · 0.80
DoMethod · 0.65
WaitMethod · 0.65
PubsubMethod · 0.45

Tested by

no test coverage detected