mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 17:26:22 +01:00
Update to JAX-RS 2.1 with resteasy 3.6.1 and jetty 9.4
This commit is contained in:
6
pom.xml
6
pom.xml
@@ -552,7 +552,7 @@
|
|||||||
<logback.version>1.1.10</logback.version>
|
<logback.version>1.1.10</logback.version>
|
||||||
<servlet.version>3.0.1</servlet.version>
|
<servlet.version>3.0.1</servlet.version>
|
||||||
|
|
||||||
<jaxrs.version>2.0.1</jaxrs.version>
|
<jaxrs.version>2.1</jaxrs.version>
|
||||||
<jersey-client.version>1.19.4</jersey-client.version>
|
<jersey-client.version>1.19.4</jersey-client.version>
|
||||||
<jackson.version>2.8.6</jackson.version>
|
<jackson.version>2.8.6</jackson.version>
|
||||||
<guice.version>4.0</guice.version>
|
<guice.version>4.0</guice.version>
|
||||||
@@ -561,8 +561,8 @@
|
|||||||
<legman.version>1.3.0</legman.version>
|
<legman.version>1.3.0</legman.version>
|
||||||
|
|
||||||
<!-- webserver -->
|
<!-- webserver -->
|
||||||
<jetty.version>9.2.10.v20150310</jetty.version>
|
<jetty.version>9.4.11.v20180605</jetty.version>
|
||||||
<jetty.maven.version>9.2.10.v20150310</jetty.maven.version>
|
<jetty.maven.version>9.4.11.v20180605</jetty.maven.version>
|
||||||
|
|
||||||
<!-- security libraries -->
|
<!-- security libraries -->
|
||||||
<ssp.version>967c8fd521</ssp.version>
|
<ssp.version>967c8fd521</ssp.version>
|
||||||
|
|||||||
@@ -560,7 +560,7 @@
|
|||||||
<enunciate.version>2.9.1</enunciate.version>
|
<enunciate.version>2.9.1</enunciate.version>
|
||||||
<wagon.version>1.0</wagon.version>
|
<wagon.version>1.0</wagon.version>
|
||||||
<mustache.version>0.8.17</mustache.version>
|
<mustache.version>0.8.17</mustache.version>
|
||||||
<resteasy.version>3.1.3.Final</resteasy.version>
|
<resteasy.version>3.5.1.Final</resteasy.version>
|
||||||
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
|
<netbeans.hint.deploy.server>Tomcat</netbeans.hint.deploy.server>
|
||||||
<sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
|
<sonar.issue.ignore.multicriteria>e1</sonar.issue.ignore.multicriteria>
|
||||||
<sonar.issue.ignore.multicriteria.e1.ruleKey>javascript:S3827</sonar.issue.ignore.multicriteria.e1.ruleKey>
|
<sonar.issue.ignore.multicriteria.e1.ruleKey>javascript:S3827</sonar.issue.ignore.multicriteria.e1.ruleKey>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class ConfigResourceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "readOnly")
|
@SubjectAware(username = "readOnly")
|
||||||
public void shouldGetGlobalConfig() throws URISyntaxException {
|
public void shouldGetGlobalConfig() throws Exception {
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + ConfigResource.CONFIG_PATH_V2);
|
MockHttpRequest request = MockHttpRequest.get("/" + ConfigResource.CONFIG_PATH_V2);
|
||||||
MockHttpResponse response = new MockHttpResponse();
|
MockHttpResponse response = new MockHttpResponse();
|
||||||
dispatcher.invoke(request, response);
|
dispatcher.invoke(request, response);
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class GroupRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldGetGroup() throws URISyntaxException {
|
public void shouldGetGroup() throws Exception {
|
||||||
Group group = createDummyGroup();
|
Group group = createDummyGroup();
|
||||||
when(groupManager.get("admin")).thenReturn(group);
|
when(groupManager.get("admin")).thenReturn(group);
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ public class GroupRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldGetAll() throws URISyntaxException {
|
public void shouldGetAll() throws Exception {
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + GroupRootResource.GROUPS_PATH_V2);
|
MockHttpRequest request = MockHttpRequest.get("/" + GroupRootResource.GROUPS_PATH_V2);
|
||||||
MockHttpResponse response = new MockHttpResponse();
|
MockHttpResponse response = new MockHttpResponse();
|
||||||
|
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public class MeResourceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "trillian", password = "secret")
|
@SubjectAware(username = "trillian", password = "secret")
|
||||||
public void shouldReturnCurrentlyAuthenticatedUser() throws URISyntaxException {
|
public void shouldReturnCurrentlyAuthenticatedUser() throws Exception {
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + MeResource.ME_PATH_V2);
|
MockHttpRequest request = MockHttpRequest.get("/" + MeResource.ME_PATH_V2);
|
||||||
request.accept(VndMediaType.USER);
|
request.accept(VndMediaType.USER);
|
||||||
MockHttpResponse response = new MockHttpResponse();
|
MockHttpResponse response = new MockHttpResponse();
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class RepositoryRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldFindExistingRepository() throws URISyntaxException {
|
public void shouldFindExistingRepository() throws Exception {
|
||||||
mockRepository("space", "repo");
|
mockRepository("space", "repo");
|
||||||
|
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/repo");
|
MockHttpRequest request = MockHttpRequest.get("/" + RepositoryRootResource.REPOSITORIES_PATH_V2 + "space/repo");
|
||||||
@@ -105,7 +105,7 @@ public class RepositoryRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldMapProperties() throws URISyntaxException {
|
public void shouldMapProperties() throws Exception {
|
||||||
Repository repository = mockRepository("space", "repo");
|
Repository repository = mockRepository("space", "repo");
|
||||||
repository.setProperty("testKey", "testValue");
|
repository.setProperty("testKey", "testValue");
|
||||||
|
|
||||||
@@ -118,7 +118,7 @@ public class RepositoryRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldGetAll() throws URISyntaxException {
|
public void shouldGetAll() throws Exception {
|
||||||
PageResult<Repository> singletonPageResult = createSingletonPageResult(mockRepository("space", "repo"));
|
PageResult<Repository> singletonPageResult = createSingletonPageResult(mockRepository("space", "repo"));
|
||||||
when(repositoryManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
when(repositoryManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
||||||
|
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ public class UserRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldCreateFullResponseForAdmin() throws URISyntaxException {
|
public void shouldCreateFullResponseForAdmin() throws Exception {
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
||||||
MockHttpResponse response = new MockHttpResponse();
|
MockHttpResponse response = new MockHttpResponse();
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ public class UserRootResourceTest {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
@SubjectAware(username = "unpriv")
|
@SubjectAware(username = "unpriv")
|
||||||
public void shouldCreateLimitedResponseForSimpleUser() throws URISyntaxException {
|
public void shouldCreateLimitedResponseForSimpleUser() throws Exception {
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "Neo");
|
||||||
MockHttpResponse response = new MockHttpResponse();
|
MockHttpResponse response = new MockHttpResponse();
|
||||||
|
|
||||||
@@ -217,7 +217,7 @@ public class UserRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldCreatePageForOnePageOnly() throws URISyntaxException {
|
public void shouldCreatePageForOnePageOnly() throws Exception {
|
||||||
PageResult<User> singletonPageResult = createSingletonPageResult(1);
|
PageResult<User> singletonPageResult = createSingletonPageResult(1);
|
||||||
when(userManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
when(userManager.getPage(any(), eq(0), eq(10))).thenReturn(singletonPageResult);
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2);
|
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2);
|
||||||
@@ -235,7 +235,7 @@ public class UserRootResourceTest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void shouldCreatePageForMultiplePages() throws URISyntaxException {
|
public void shouldCreatePageForMultiplePages() throws Exception {
|
||||||
PageResult<User> singletonPageResult = createSingletonPageResult(3);
|
PageResult<User> singletonPageResult = createSingletonPageResult(3);
|
||||||
when(userManager.getPage(any(), eq(1), eq(1))).thenReturn(singletonPageResult);
|
when(userManager.getPage(any(), eq(1), eq(1))).thenReturn(singletonPageResult);
|
||||||
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "?page=1&pageSize=1");
|
MockHttpRequest request = MockHttpRequest.get("/" + UserRootResource.USERS_PATH_V2 + "?page=1&pageSize=1");
|
||||||
|
|||||||
Reference in New Issue
Block a user