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

Function withParameterSchemas

coderd/wsbuilder/wsbuilder_test.go:1426–1438  ·  view source on GitHub ↗
(jobID uuid.UUID, schemas []database.ParameterSchema)

Source from the content-addressed store, hash-verified

1424}
1425
1426func withParameterSchemas(jobID uuid.UUID, schemas []database.ParameterSchema) func(mTx *dbmock.MockStore) {
1427 return func(mTx *dbmock.MockStore) {
1428 c := mTx.EXPECT().GetParameterSchemasByJobID(
1429 gomock.Any(),
1430 jobID).
1431 Times(1)
1432 if len(schemas) > 0 {
1433 c.Return(schemas, nil)
1434 } else {
1435 c.Return(nil, sql.ErrNoRows)
1436 }
1437 }
1438}
1439
1440func withTemplateVersionVariables(versionID uuid.UUID, params []database.TemplateVersionVariable) func(mTx *dbmock.MockStore) {
1441 return func(mTx *dbmock.MockStore) {

Callers 10

TestBuilder_NoOptionsFunction · 0.85
TestBuilder_InitiatorFunction · 0.85
TestBuilder_BaggageFunction · 0.85
TestBuilder_ReasonFunction · 0.85

Calls 2

EXPECTMethod · 0.45

Tested by

no test coverage detected