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

Function seedChatDebugStep

coderd/exp_chats_test.go:12492–12510  ·  view source on GitHub ↗
(
	ctx context.Context,
	t *testing.T,
	db database.Store,
	run database.ChatDebugRun,
	stepNumber int32,
)

Source from the content-addressed store, hash-verified

12490}
12491
12492func seedChatDebugStep(
12493 ctx context.Context,
12494 t *testing.T,
12495 db database.Store,
12496 run database.ChatDebugRun,
12497 stepNumber int32,
12498) database.ChatDebugStep {
12499 t.Helper()
12500
12501 step, err := db.InsertChatDebugStep(dbauthz.AsSystemRestricted(ctx), database.InsertChatDebugStepParams{
12502 RunID: run.ID,
12503 ChatID: run.ChatID,
12504 StepNumber: stepNumber,
12505 Operation: string(codersdk.ChatDebugStepOperationStream),
12506 Status: string(codersdk.ChatDebugStatusCompleted),
12507 })
12508 require.NoError(t, err)
12509 return step
12510}
12511
12512func TestChatDebugRuns(t *testing.T) {
12513 t.Parallel()

Callers 1

TestChatDebugRunFunction · 0.85

Calls 3

AsSystemRestrictedFunction · 0.92
HelperMethod · 0.65
InsertChatDebugStepMethod · 0.65

Tested by

no test coverage detected