@@ -139,10 +139,10 @@ public class MgmtTargetResourceTest extends AbstractRestIntegrationTest {
|
|||||||
public void securityTokenIsNotInResponseIfMissingPermission() throws Exception {
|
public void securityTokenIsNotInResponseIfMissingPermission() throws Exception {
|
||||||
|
|
||||||
final String knownControllerId = "knownControllerId";
|
final String knownControllerId = "knownControllerId";
|
||||||
targetManagement.createTarget(entityFactory.generateTarget(knownControllerId));
|
final Target createTarget = targetManagement.createTarget(entityFactory.generateTarget(knownControllerId));
|
||||||
mvc.perform(get(MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}", knownControllerId))
|
mvc.perform(get(MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/{targetId}", knownControllerId))
|
||||||
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
|
.andDo(MockMvcResultPrinter.print()).andExpect(status().isOk())
|
||||||
.andExpect(jsonPath("securityToken").doesNotExist());
|
.andExpect(jsonPath("securityToken", equalTo(null)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -17,12 +17,15 @@ import org.springframework.beans.factory.FactoryBean;
|
|||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Scope;
|
import org.springframework.context.annotation.Scope;
|
||||||
|
import org.springframework.hateoas.config.EnableHypermediaSupport;
|
||||||
|
import org.springframework.hateoas.config.EnableHypermediaSupport.HypermediaType;
|
||||||
import org.springframework.web.context.WebApplicationContext;
|
import org.springframework.web.context.WebApplicationContext;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration for Rest api.
|
* Configuration for Rest api.
|
||||||
*/
|
*/
|
||||||
@Configuration
|
@Configuration
|
||||||
|
@EnableHypermediaSupport(type = { HypermediaType.HAL })
|
||||||
public class RestConfiguration {
|
public class RestConfiguration {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
13
pom.xml
13
pom.xml
@@ -66,7 +66,13 @@
|
|||||||
<!-- Spring boot version overrides (should be reviewed with every boot upgrade) - START -->
|
<!-- Spring boot version overrides (should be reviewed with every boot upgrade) - START -->
|
||||||
<!-- Newer versions needed than defined in Boot-->
|
<!-- Newer versions needed than defined in Boot-->
|
||||||
<spring-cloud-connectors.version>1.2.0.RELEASE</spring-cloud-connectors.version>
|
<spring-cloud-connectors.version>1.2.0.RELEASE</spring-cloud-connectors.version>
|
||||||
|
<<<<<<< Upstream, based on master
|
||||||
<spring-amqp.version>1.6.1.RELEASE</spring-amqp.version>
|
<spring-amqp.version>1.6.1.RELEASE</spring-amqp.version>
|
||||||
|
=======
|
||||||
|
<spring-amqp.version>1.6.0.RELEASE</spring-amqp.version>
|
||||||
|
<rabbitmq.version>3.6.2</rabbitmq.version>
|
||||||
|
<spring-security.version>4.1.1.RELEASE</spring-security.version>
|
||||||
|
>>>>>>> e285495 Fixed tests.
|
||||||
<!-- Support for MongoDB 3 -->
|
<!-- Support for MongoDB 3 -->
|
||||||
<mongodb.version>3.2.2</mongodb.version>
|
<mongodb.version>3.2.2</mongodb.version>
|
||||||
<!-- Spring boot version overrides - END -->
|
<!-- Spring boot version overrides - END -->
|
||||||
@@ -99,7 +105,6 @@
|
|||||||
<guava.version>19.0</guava.version>
|
<guava.version>19.0</guava.version>
|
||||||
<mariadb-java-client.version>1.4.3</mariadb-java-client.version>
|
<mariadb-java-client.version>1.4.3</mariadb-java-client.version>
|
||||||
<embedded-mongo.version>1.50.5</embedded-mongo.version>
|
<embedded-mongo.version>1.50.5</embedded-mongo.version>
|
||||||
<jersey-client.version>1.18.1</jersey-client.version>
|
|
||||||
<javax.el-api.version>2.2.4</javax.el-api.version>
|
<javax.el-api.version>2.2.4</javax.el-api.version>
|
||||||
<corn-cps.version>1.1.7</corn-cps.version>
|
<corn-cps.version>1.1.7</corn-cps.version>
|
||||||
<jlorem.version>1.1</jlorem.version>
|
<jlorem.version>1.1</jlorem.version>
|
||||||
@@ -558,12 +563,6 @@
|
|||||||
<version>${allure.version}</version>
|
<version>${allure.version}</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
|
||||||
<groupId>com.sun.jersey</groupId>
|
|
||||||
<artifactId>jersey-client</artifactId>
|
|
||||||
<version>${jersey-client.version}</version>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>pl.pragmatists</groupId>
|
<groupId>pl.pragmatists</groupId>
|
||||||
<artifactId>JUnitParams</artifactId>
|
<artifactId>JUnitParams</artifactId>
|
||||||
|
|||||||
Reference in New Issue
Block a user