Skip to content

Commit

Permalink
Add information about Testcontainers
Browse files Browse the repository at this point in the history
  • Loading branch information
mtuchkova committed Mar 30, 2022
1 parent ffb1731 commit f0acf18
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion docs/developers/functional-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Main language: Groovy. Project functional tests use [Spock](https://spockframework.org/) as a main testing framework.
Also used [Docker](https://www.docker.com/) for running PBS and other services.
[Testcontainers](https://www.testcontainers.org/) is used as provider of lightweight, throwaway instances of PBS, MySQLContainer, MockServerContainer containers.
And [MockServer](https://www.mock-server.com/) for mocking external services.

## Getting Started
Expand Down Expand Up @@ -44,7 +45,7 @@ Functional tests need to have name template **.\*Spec.groovy**

`launchContainers` - responsible for starting the MockServer and the MySQLContainer container. Default value is false.
`max.containers.count` - maximum number of simultaneously running PBS containers. Default value is 2.
`skipFunctionalTests` - allow to skip funtional tests. Default value is false.
`skipFunctionalTests` - allow to skip funtional tests. Default value is false to not launch containers for unit tests.
`skipUnitTests` - allow to skip unit tests. Default value is false.

**Debug:**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@ class PrebidServerContainer extends GenericContainer<PrebidServerContainer> {
.forStatusCode(200))
withDebug()
withNetwork(Dependencies.network)
def commonConfig = [:] << DEFAULT_ENV << PbsConfig.defaultBiddersConfig << PbsConfig.metricConfig <<
PbsConfig.adminEndpointConfig << PbsConfig.bidderConfig << PbsConfig.prebidCacheConfig
def commonConfig = [:] << DEFAULT_ENV
<< PbsConfig.defaultBiddersConfig
<< PbsConfig.metricConfig
<< PbsConfig.adminEndpointConfig
<< PbsConfig.bidderConfig
<< PbsConfig.prebidCacheConfig
<< PbsConfig.mySqlConfig
withConfig(commonConfig)
withConfig(customConfig)
Expand Down

0 comments on commit f0acf18

Please sign in to comment.