Skip to content

Commit

Permalink
Allow allow-bean-definition-overriding for tests only (3)
Browse files Browse the repository at this point in the history
  • Loading branch information
thibauult committed Jan 13, 2022
1 parent 8998e59 commit 5b2344c
Showing 1 changed file with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public class SymphonyBdkAutoConfigurationTest {
void shouldLoadContextWithSuccess() {

final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.pod.scheme=http",
"bdk.pod.host=localhost",
Expand Down Expand Up @@ -73,6 +73,7 @@ void shouldLoadContextWithSuccess() {
@Test
void shouldInitializeOboAuthenticatorIfAppIdSet() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.scheme=http",
"bdk.host=localhost",
Expand Down Expand Up @@ -120,7 +121,7 @@ void shouldInitializeOboAuthenticatorIfAppIdSet() {
@Test
void shouldInitializeCustomAuthenticatorsIfTheyExist() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.scheme=http",
"bdk.host=localhost",
Expand Down Expand Up @@ -148,7 +149,7 @@ void shouldInitializeCustomAuthenticatorsIfTheyExist() {
@Test
void shouldFailOnOboAuthenticatorInitializationIfNotProperlyConfigured() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.scheme=http",
"bdk.host=localhost",
Expand All @@ -172,7 +173,7 @@ void shouldFailOnOboAuthenticatorInitializationIfNotProperlyConfigured() {
void shouldLoadParentConfigurationIfSet() {

final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.scheme=http",
"bdk.host=localhost",
Expand All @@ -194,7 +195,7 @@ void shouldLoadParentConfigurationIfSet() {
@Test
void shouldInstantiateLoadBalancedApiClientIfConfigured() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.scheme=http",
"bdk.host=localhost",
Expand All @@ -221,7 +222,7 @@ void shouldInstantiateLoadBalancedApiClientIfConfigured() {
@Test
void shouldNotInitializeDatafeedIfDisabled() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.host=localhost",

Expand Down Expand Up @@ -249,7 +250,7 @@ void shouldNotInitializeDatafeedIfDisabled() {
@Test
void shouldNotInitializeBotSessionWhenOboOnly() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withPropertyValues("spring.main.allow-bean-definition-overriding=true")
.withAllowBeanDefinitionOverriding(true)
.withPropertyValues(
"bdk.host=localhost",

Expand All @@ -274,6 +275,7 @@ void shouldNotInitializeBotSessionWhenOboOnly() {
@Test
void systemApiClientShouldTargetAgentBasePath() {
final ApplicationContextRunner contextRunner = new ApplicationContextRunner()
.withAllowBeanDefinitionOverriding(true)
.withUserConfiguration(SymphonyBdkMockedConfiguration.class)
.withConfiguration(AutoConfigurations.of(SymphonyBdkAutoConfiguration.class));

Expand Down

0 comments on commit 5b2344c

Please sign in to comment.