MCPcopy Create free account
hub / github.com/ebosas/microservices / testArguments

Function testArguments

cmd/database/database_test.go:46–55  ·  view source on GitHub ↗

testArguments produces arguments for the function being tested

(t *testing.T, message, source string, time int64)

Source from the content-addressed store, hash-verified

44
45// testArguments produces arguments for the function being tested
46func testArguments(t *testing.T, message, source string, time int64) *amqp.Delivery {
47 inputMsg := models.Message{Text: message, Source: source, Time: time}
48 messageJson, err := json.Marshal(inputMsg)
49 if err != nil {
50 t.Fatalf("marshal message: %s", err)
51 }
52 d := &amqp.Delivery{Body: messageJson}
53
54 return d
55}

Callers 1

TestInsertToDBFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected