This commit is contained in:
Phillip Webb
2017-07-19 10:18:55 -07:00
parent cd23de6ed5
commit 68910f2b8f
7 changed files with 40 additions and 33 deletions

View File

@@ -264,8 +264,8 @@ public class ResourceServerTokenServicesConfigurationTests {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.resource.jwk.key-set-uri=http://my-auth-server/token_keys");
this.context = new SpringApplicationBuilder(JwkTokenStoreConfiguration.class,
ResourceConfiguration.class)
.environment(this.environment).web(false).run();
ResourceConfiguration.class).environment(this.environment).web(false)
.run();
assertThat(this.context.getBeansOfType(JwkTokenStore.class)).hasSize(1);
}
@@ -273,8 +273,9 @@ public class ResourceServerTokenServicesConfigurationTests {
public void jwtTokenStoreShouldBeConditionalOnMissingBean() throws Exception {
EnvironmentTestUtils.addEnvironment(this.environment,
"security.oauth2.resource.jwt.keyValue=" + PUBLIC_KEY);
this.context = new SpringApplicationBuilder(JwtTokenStoreConfiguration.class, ResourceConfiguration.class)
.environment(this.environment).web(false).run();
this.context = new SpringApplicationBuilder(JwtTokenStoreConfiguration.class,
ResourceConfiguration.class).environment(this.environment).web(false)
.run();
assertThat(this.context.getBeansOfType(JwtTokenStore.class)).hasSize(1);
}