Rename media type

This commit is contained in:
René Pfeuffer
2019-01-23 11:19:55 +01:00
parent b8679d1f83
commit 6bf216d379
6 changed files with 19 additions and 19 deletions

View File

@@ -238,7 +238,7 @@ public class RepositoryPermissionRootResourceTest extends RepositoryTestBase {
MockHttpRequest request = MockHttpRequest
.post("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + PATH_OF_ALL_PERMISSIONS)
.content(permissionJson.getBytes())
.contentType(VndMediaType.PERMISSION);
.contentType(VndMediaType.REPOSITORY_PERMISSION);
MockHttpResponse response = new MockHttpResponse();
dispatcher.invoke(request, response);
@@ -250,7 +250,7 @@ public class RepositoryPermissionRootResourceTest extends RepositoryTestBase {
request = MockHttpRequest
.post("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + PATH_OF_ALL_PERMISSIONS)
.content(permissionJson.getBytes())
.contentType(VndMediaType.PERMISSION);
.contentType(VndMediaType.REPOSITORY_PERMISSION);
response = new MockHttpResponse();
dispatcher.invoke(request, response);
@@ -430,7 +430,7 @@ public class RepositoryPermissionRootResourceTest extends RepositoryTestBase {
HttpRequest request = MockHttpRequest
.create(entry.method, "/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + entry.path)
.content(entry.content)
.contentType(VndMediaType.PERMISSION);
.contentType(VndMediaType.REPOSITORY_PERMISSION);
dispatcher.invoke(request, response);
log.info("Test the Request :{}", entry);
assertThat(response.getStatus())

View File

@@ -124,8 +124,8 @@ public class GitLfsITCase {
String permissionsUrl = repository.getLinks().getLinkBy("permissions").get().getHref();
IntegrationTestUtil.createResource(adminClient, URI.create(permissionsUrl))
.accept("*/*")
.type(VndMediaType.PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"type\":\"WRITE\"}");
.type(VndMediaType.REPOSITORY_PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"verbs\":[\"*\"]}");
ScmClient client = new ScmClient(trillian.getId(), "secret123");
@@ -165,8 +165,8 @@ public class GitLfsITCase {
String permissionsUrl = repository.getLinks().getLinkBy("permissions").get().getHref();
IntegrationTestUtil.createResource(adminClient, URI.create(permissionsUrl))
.accept("*/*")
.type(VndMediaType.PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"type\":\"READ\"}");
.type(VndMediaType.REPOSITORY_PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"verbs\":[\"read\"]}");
ScmClient client = new ScmClient(trillian.getId(), "secret123");
uploadAndDownload(client);
@@ -186,8 +186,8 @@ public class GitLfsITCase {
String permissionsUrl = repository.getLinks().getLinkBy("permissions").get().getHref();
IntegrationTestUtil.createResource(adminClient, URI.create(permissionsUrl))
.accept("*/*")
.type(VndMediaType.PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"type\":\"READ\"}");
.type(VndMediaType.REPOSITORY_PERMISSION)
.post(ClientResponse.class, "{\"name\": \""+ trillian.getId() +"\", \"verbs\":[\"read\"]}");
// upload data as admin
String data = UUID.randomUUID().toString();