Commit 5b990605 authored by Madhura Bhave's avatar Madhura Bhave

Polish "Order actuator security config after resource-server config"

Closes gh-15472
parent 4597e7cc
......@@ -120,17 +120,14 @@ public class ReactiveManagementWebSecurityAutoConfigurationTests {
}
@Test
public void backsOffIfReactiveOAuth2ResourceServerAutoConfigurationSecurityIsAdded() {
public void backOffIfReactiveOAuth2ResourceServerAutoConfigurationPresent() {
this.contextRunner
.withConfiguration(AutoConfigurations
.of(ReactiveOAuth2ResourceServerAutoConfiguration.class))
.withPropertyValues(
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://authserver")
.run((context) -> {
assertThat(context.getBeanNamesForType(
ReactiveManagementWebSecurityAutoConfiguration.class))
.isEmpty();
});
.run((context) -> assertThat(context).doesNotHaveBean(
ReactiveManagementWebSecurityAutoConfiguration.class));
}
@Test
......
......@@ -108,16 +108,14 @@ public class ManagementWebSecurityAutoConfigurationTests {
}
@Test
public void backOffIfOAuth2ResourceServerAutoConfigurationSecurityIsAdded() {
public void backOffIfOAuth2ResourceServerAutoConfigurationPresent() {
this.contextRunner
.withConfiguration(AutoConfigurations
.of(OAuth2ResourceServerAutoConfiguration.class))
.withPropertyValues(
"spring.security.oauth2.resourceserver.jwt.jwk-set-uri=http://authserver")
.run((context) -> {
assertThat(context.getBeanNamesForType(
ManagementWebSecurityConfigurerAdapter.class)).isEmpty();
});
.run((context) -> assertThat(context)
.doesNotHaveBean(ManagementWebSecurityConfigurerAdapter.class));
}
private HttpStatus getResponseStatus(AssertableWebApplicationContext context,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment