(t *testing.T)
| 981 | } |
| 982 | |
| 983 | func TestDeletePureFactoryPluginIsRejected(t *testing.T) { |
| 984 | setupTaskPluginControllerTest(t) |
| 985 | recorder := httptest.NewRecorder() |
| 986 | context, _ := gin.CreateTestContext(recorder) |
| 987 | context.Params = gin.Params{{Key: "key", Value: "kling"}, {Key: "version", Value: "1.0.0"}} |
| 988 | context.Request = httptest.NewRequest(http.MethodDelete, "/api/plugin/task/kling/versions/1.0.0", nil) |
| 989 | |
| 990 | DeleteTaskPluginVersion(context) |
| 991 | |
| 992 | assert.Contains(t, recorder.Body.String(), `"success":false`) |
| 993 | assert.Contains(t, recorder.Body.String(), "factory plugins cannot be deleted") |
| 994 | _, ok := jsplugin.DefaultRegistry.Get("kling") |
| 995 | assert.True(t, ok) |
| 996 | } |
| 997 | |
| 998 | func TestUploadTaskPluginSourceSha256(t *testing.T) { |
| 999 | setupTaskPluginControllerTest(t) |
nothing calls this directly
no test coverage detected