Skip to content

Commit

Permalink
fix(retrofit2): fix the integration test failure by changing the prof…
Browse files Browse the repository at this point in the history
…ile name of all the test classes that use Retrofit2TestConfig.

Error Details:
Parameter 1 of constructor in com.netflix.spinnaker.config.OkHttpClientComponents required a single bean, but 2 were found:
       - okHttpClientConfigurationProperties: defined by method 'okHttpClientConfigurationProperties' in class path resource [com/netflix/spinnaker/echo/config/Retrofit2TestConfig.class]
       - ok-http-client-com.netflix.spinnaker.okhttp.OkHttpClientConfigurationProperties: defined in unknown location
  • Loading branch information
kirangodishala committed Dec 30, 2024
1 parent 4b1b77b commit ee81fce
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.ActiveProfiles
import spock.lang.Specification

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(
classes = [Retrofit2TestConfig, Retrofit2BasicLogTestConfig],
properties = ["github-status.enabled=true"],
Expand Down Expand Up @@ -74,7 +74,7 @@ class GithubConfigLogLevelBasicSpec extends Specification {
}
}

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(
classes = [Retrofit2TestConfig, Retrofit2NoneLogTestConfig],
properties = ["github-status.enabled=true"],
Expand Down Expand Up @@ -121,7 +121,7 @@ class GithubConfigLogLevelNoneSpec extends Specification {
}
}

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(
classes = [Retrofit2TestConfig, Retrofit2HeadersLogTestConfig],
properties = ["github-status.enabled=true"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import org.springframework.test.context.ActiveProfiles
import spock.lang.Specification
import spock.lang.Subject

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(
classes = [SlackConfig, Retrofit2TestConfig, Retrofit2BasicLogTestConfig],
properties = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import spock.util.concurrent.BlockingVariable

import static java.util.Collections.emptyList

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(classes = [Retrofit2TestConfig, Retrofit2BasicLogTestConfig],
properties = ["slack.enabled=true"],
webEnvironment = SpringBootTest.WebEnvironment.NONE)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import spock.lang.Specification
import spock.lang.Subject
import spock.util.concurrent.BlockingVariable

@ActiveProfiles("test")
@ActiveProfiles("testing")
@SpringBootTest(classes = [Retrofit2TestConfig, Retrofit2BasicLogTestConfig],
webEnvironment = SpringBootTest.WebEnvironment.NONE)
class RestConfigSpec extends Specification {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import org.springframework.context.annotation.Configuration
import org.springframework.context.annotation.Profile

@Configuration
@Profile("test")
@Profile("testing")
class Retrofit2TestConfig {
@Autowired
ObjectFactory<OkHttpClient.Builder> httpClientBuilderFactory
Expand Down

0 comments on commit ee81fce

Please sign in to comment.