MCPcopy Index your code
hub / github.com/rilldata/rill / TriggerDeployment

Method TriggerDeployment

admin/testadmin/testadmin.go:283–299  ·  view source on GitHub ↗
(t *testing.T, org, project string)

Source from the content-addressed store, hash-verified

281}
282
283func (f *Fixture) TriggerDeployment(t *testing.T, org, project string) *database.Deployment {
284 proj, err := f.Admin.DB.FindProjectByName(t.Context(), org, project)
285 require.NoError(t, err)
286 depl, err := f.Admin.DB.FindDeploymentsForProject(t.Context(), proj.ID, "", "")
287 require.NoError(t, err)
288 require.Len(t, depl, 1)
289 err = river.NewReconcileDeploymentWorker(f.Admin).Work(t.Context(), &riverqueue.Job[river.ReconcileDeploymentArgs]{
290 Args: river.ReconcileDeploymentArgs{
291 DeploymentID: depl[0].ID,
292 },
293 })
294 require.NoError(t, err)
295 depl, err = f.Admin.DB.FindDeploymentsForProject(t.Context(), proj.ID, "", "")
296 require.NoError(t, err)
297 require.Len(t, depl, 1)
298 return depl[0]
299}
300
301// newGithub creates a new Github client. In short testing mode this is a mock client which has no-op implementations of all methods.
302// Otherwise it creates a real implementation that makes real API calls to Github.

Callers 4

TestRuntimeDeploymentsFunction · 0.80
TestPrimaryBranchChangeFunction · 0.80
TestEmbedOpenFunction · 0.80
TestDeploymentJWTsFunction · 0.80

Calls 5

FindProjectByNameMethod · 0.65
ContextMethod · 0.65
WorkMethod · 0.65
LenMethod · 0.45

Tested by 4

TestRuntimeDeploymentsFunction · 0.64
TestPrimaryBranchChangeFunction · 0.64
TestEmbedOpenFunction · 0.64
TestDeploymentJWTsFunction · 0.64