Update the samples to use @WebIntegrationTest and randomPort=true
Closes gh-4294 Closes gh-4271
This commit is contained in:
committed by
Andy Wilkinson
parent
acf6f2193b
commit
1c5e445554
@@ -9,14 +9,13 @@ import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.IntegrationTest;
|
||||
import org.springframework.boot.test.SpringApplicationConfiguration;
|
||||
import org.springframework.boot.test.WebIntegrationTest;
|
||||
import org.springframework.hateoas.MediaTypes;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.security.crypto.codec.Base64;
|
||||
import org.springframework.security.web.FilterChainProxy;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
import org.springframework.test.context.web.WebAppConfiguration;
|
||||
import org.springframework.test.web.servlet.MockMvc;
|
||||
import org.springframework.test.web.servlet.MvcResult;
|
||||
import org.springframework.web.context.WebApplicationContext;
|
||||
@@ -37,9 +36,8 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC
|
||||
* @author Greg Turnquist
|
||||
*/
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@WebAppConfiguration
|
||||
@SpringApplicationConfiguration(SampleSecureOAuth2Application.class)
|
||||
@IntegrationTest("server.port:0")
|
||||
@WebIntegrationTest(randomPort = true)
|
||||
public class SampleSecureOAuth2ApplicationTests {
|
||||
|
||||
@Autowired
|
||||
|
||||
Reference in New Issue
Block a user