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

Function createWorkspace

enterprise/coderd/connectionlog/connectionlog_test.go:25–40  ·  view source on GitHub ↗
(t *testing.T, db database.Store)

Source from the content-addressed store, hash-verified

23)
24
25func createWorkspace(t *testing.T, db database.Store) database.WorkspaceTable {
26 t.Helper()
27 u := dbgen.User(t, db, database.User{})
28 o := dbgen.Organization(t, db, database.Organization{})
29 tpl := dbgen.Template(t, db, database.Template{
30 OrganizationID: o.ID,
31 CreatedBy: u.ID,
32 })
33 return dbgen.Workspace(t, db, database.WorkspaceTable{
34 ID: uuid.New(),
35 OwnerID: u.ID,
36 OrganizationID: o.ID,
37 AutomaticUpdates: database.AutomaticUpdatesNever,
38 TemplateID: tpl.ID,
39 })
40}
41
42func testIP() pqtype.Inet {
43 return pqtype.Inet{

Callers 2

TestDBBackendIntegrationFunction · 0.70
TestConnectionLogsFunction · 0.50

Calls 6

UserFunction · 0.92
OrganizationFunction · 0.92
TemplateFunction · 0.92
WorkspaceFunction · 0.92
HelperMethod · 0.65
NewMethod · 0.65

Tested by

no test coverage detected