MCPcopy Create free account
hub / github.com/QuantumNous/new-api / runTaskPluginDryRun

Function runTaskPluginDryRun

controller/task_plugin_test.go:800–809  ·  view source on GitHub ↗
(t *testing.T, body string)

Source from the content-addressed store, hash-verified

798`
799
800func runTaskPluginDryRun(t *testing.T, body string) *httptest.ResponseRecorder {
801 t.Helper()
802 recorder := httptest.NewRecorder()
803 context, _ := gin.CreateTestContext(recorder)
804 context.Params = gin.Params{{Key: "key", Value: "dryrun-probe"}}
805 context.Request = httptest.NewRequest(http.MethodPost, "/api/plugin/task/dryrun-probe/dryrun", strings.NewReader(body))
806 context.Request.Header.Set("Content-Type", "application/json")
807 DryRunTaskPlugin(context)
808 return recorder
809}
810
811func TestDryRunTaskPluginExecutesHookAndRendererMember(t *testing.T) {
812 setupTaskPluginControllerTest(t)

Calls 3

DryRunTaskPluginFunction · 0.85
SetMethod · 0.80
NewReaderMethod · 0.65

Tested by

no test coverage detected