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

Function postJob

coderd/provisionerdserver/acquirer_test.go:552–561  ·  view source on GitHub ↗
(t *testing.T, ps pubsub.Pubsub, pt database.ProvisionerType, tags provisionerdserver.Tags)

Source from the content-addressed store, hash-verified

550}
551
552func postJob(t *testing.T, ps pubsub.Pubsub, pt database.ProvisionerType, tags provisionerdserver.Tags) {
553 t.Helper()
554 msg, err := json.Marshal(provisionerjobs.JobPosting{
555 ProvisionerType: pt,
556 Tags: tags,
557 })
558 require.NoError(t, err)
559 err = ps.Publish(provisionerjobs.EventJobPosted, msg)
560 require.NoError(t, err)
561}
562
563// fakeOrderedStore is a fake store that lets tests send AcquireProvisionerJob
564// results in order over a channel, and tests for overlapped calls.

Callers 2

Calls 3

HelperMethod · 0.65
PublishMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected