Drop superfluous annotations

Update internal tests to drop annotations that can now
be inferred.

Fixes gh-5470
This commit is contained in:
Phillip Webb
2016-02-18 09:48:17 -08:00
parent 7dffb702b5
commit 0829a1bde8
64 changed files with 5 additions and 131 deletions

View File

@@ -24,7 +24,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -41,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(randomPort = true)
@DirtiesContext
@ActiveProfiles("endpoints")

View File

@@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -41,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.port=0", "management.context-path=/admin",
"management.security.enabled=false" }, randomPort = true)
@DirtiesContext

View File

@@ -22,7 +22,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -40,7 +39,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.security.enabled:false" }, randomPort = true)
@DirtiesContext
@ActiveProfiles("unsecure-management")

View File

@@ -22,7 +22,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -39,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "security.basic.enabled:false" }, randomPort = true)
@DirtiesContext
public class InsecureSampleActuatorApplicationTests {

View File

@@ -23,7 +23,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -39,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.port=0", "management.address=127.0.0.1",
"management.context-path:/admin" }, randomPort = true)
@DirtiesContext

View File

@@ -22,7 +22,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -38,7 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.context_path=/admin" }, randomPort = true)
@DirtiesContext
public class ManagementPathSampleActuatorApplicationTests {

View File

@@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -41,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.port=0",
"management.context-path=/admin" }, randomPort = true)
@DirtiesContext

View File

@@ -25,7 +25,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -41,7 +40,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.port=0" }, randomPort = true)
@DirtiesContext
public class ManagementPortSampleActuatorApplicationTests {

View File

@@ -24,7 +24,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -40,7 +39,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "management.port=-1" }, randomPort = true)
@DirtiesContext
public class NoManagementSampleActuatorApplicationTests {

View File

@@ -20,7 +20,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -36,7 +35,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Phillip Webb
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "endpoints.health.sensitive=false" }, randomPort = true)
@DirtiesContext
public class NonSensitiveHealthTests {

View File

@@ -27,7 +27,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpEntity;
@@ -48,7 +47,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Stephane Nicoll
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(randomPort = true)
@DirtiesContext
public class SampleActuatorApplicationTests {

View File

@@ -22,7 +22,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -39,7 +38,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "security.basic.enabled:false",
"server.servletPath:/spring" }, randomPort = true)
@DirtiesContext

View File

@@ -22,7 +22,6 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -38,7 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(value = { "server.servletPath=/spring" }, randomPort = true)
@DirtiesContext
public class ServletPathSampleActuatorApplicationTests {

View File

@@ -24,7 +24,6 @@ import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.security.SecurityProperties;
import org.springframework.boot.context.web.LocalServerPort;
import org.springframework.boot.test.context.SpringApplicationConfiguration;
import org.springframework.boot.test.context.web.WebIntegrationTest;
import org.springframework.boot.test.web.client.TestRestTemplate;
import org.springframework.http.HttpStatus;
@@ -40,7 +39,6 @@ import static org.assertj.core.api.Assertions.assertThat;
* @author Dave Syer
*/
@RunWith(SpringRunner.class)
@SpringApplicationConfiguration(SampleActuatorApplication.class)
@WebIntegrationTest(randomPort = true)
@DirtiesContext
public class ShutdownSampleActuatorApplicationTests {