add resource tests

This commit is contained in:
Eduard Heimbuch
2019-08-01 08:38:53 +02:00
parent f699f0ef43
commit 35c5a69511
3 changed files with 222 additions and 22 deletions

View File

@@ -11,6 +11,7 @@ import sonia.scm.plugin.PluginState;
import sonia.scm.web.VndMediaType;
import javax.inject.Inject;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
@@ -66,6 +67,7 @@ public class AvailablePluginResource {
@Path("/{name}/{version}")
@StatusCodes({
@ResponseCode(code = 200, condition = "success"),
@ResponseCode(code = 404, condition = "not found"),
@ResponseCode(code = 500, condition = "internal server error")
})
@TypeHint(PluginDto.class)
@@ -91,6 +93,7 @@ public class AvailablePluginResource {
*/
@POST
@Path("/{name}/{version}/install")
@Consumes(VndMediaType.PLUGIN)
@StatusCodes({
@ResponseCode(code = 200, condition = "success"),
@ResponseCode(code = 500, condition = "internal server error")