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

Function createTestStepN

coderd/x/chatd/chatdebug/summary_test.go:465–481  ·  view source on GitHub ↗

createTestStepN creates a debug step with the given step number.

(
	t *testing.T,
	fixture testFixture,
	runID uuid.UUID,
	stepNumber int32,
)

Source from the content-addressed store, hash-verified

463
464// createTestStepN creates a debug step with the given step number.
465func createTestStepN(
466 t *testing.T,
467 fixture testFixture,
468 runID uuid.UUID,
469 stepNumber int32,
470) database.ChatDebugStep {
471 t.Helper()
472 step, err := fixture.svc.CreateStep(fixture.ctx, chatdebug.CreateStepParams{
473 RunID: runID,
474 ChatID: fixture.chat.ID,
475 StepNumber: stepNumber,
476 Operation: chatdebug.OperationGenerate,
477 Status: chatdebug.StatusInProgress,
478 })
479 require.NoError(t, err)
480 return step
481}
482
483// updateTestStepWithUsage completes a step and sets token usage fields.
484func updateTestStepWithUsage(

Callers 2

createTestStepFunction · 0.85

Calls 2

CreateStepMethod · 0.80
HelperMethod · 0.65

Tested by

no test coverage detected