(t *testing.T, body string)
| 798 | ` |
| 799 | |
| 800 | func 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 | |
| 811 | func TestDryRunTaskPluginExecutesHookAndRendererMember(t *testing.T) { |
| 812 | setupTaskPluginControllerTest(t) |
no test coverage detected