File tree Expand file tree Collapse file tree 6 files changed +45
-5
lines changed
driver-management/src/test
java/pl/piomin/services/driver/contract
passenger-management/src/test/java/pl/piomin/services/passenger Expand file tree Collapse file tree 6 files changed +45
-5
lines changed Original file line number Diff line number Diff line change 66 - image : ' cimg/openjdk:8.0'
77 steps :
88 - checkout
9+ - run :
10+ name : Run Pact Broker
11+ command : docker-compose up -v
912 - run :
1013 name : Analyze on SonarCloud
1114 command : mvn verify sonar:sonar
15+ - run :
16+ name : Run Pact Broker
17+ command : docker-compose down -v
1218
1319executors :
1420 j8 :
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+ postgres :
5+ image : postgres
6+ healthcheck :
7+ test : psql postgres --command "select 1" -U postgres
8+ volumes :
9+ - postgres-volume:/var/lib/postgresql/data
10+ environment :
11+ POSTGRES_USER : postgres
12+ POSTGRES_PASSWORD : password
13+ POSTGRES_DB : postgres
14+
15+ pact-broker :
16+ image : pactfoundation/pact-broker:2.105.0.1
17+ ports :
18+ - " 9292:9292"
19+ depends_on :
20+ - postgres
21+ environment :
22+ PACT_BROKER_PORT : ' 9292'
23+ PACT_BROKER_DATABASE_URL : " postgres://postgres:password@postgres/postgres"
24+ PACT_BROKER_LOG_LEVEL : INFO
25+ PACT_BROKER_SQL_LOG_LEVEL : DEBUG
26+ PACT_BROKER_DATABASE_CONNECT_MAX_RETRIES : " 5"
27+ PACT_BROKER_BASE_URL : ' https://localhost http://localhost http://localhost:9292 http://pact-broker:9292 https://host.docker.internal http://host.docker.internal http://host.docker.internal:9292'
28+
29+ volumes :
30+ postgres-volume:
Original file line number Diff line number Diff line change 2121
2222@ RunWith (SpringRestPactRunner .class )
2323@ Provider ("driverManagementProvider" )
24- @ PactBroker
24+ @ PactBroker ( host = "localhost" , port = "9292" )
2525public class DriverControllerContractTests {
2626
2727 @ InjectMocks
Original file line number Diff line number Diff line change 11pactbroker :
2- host : " 192.168.99.100"
3- port : " 8090"
2+ host : " localhost"
3+ port : " 9292"
4+ protocol : " http"
5+ auth :
6+ username : " "
7+ password : " "
Original file line number Diff line number Diff line change 1919
2020@ RunWith (SpringRestPactRunner .class )
2121@ Provider ("passengerManagementProvider" )
22- @ PactBroker (host = "192.168.99.100 " , port = "9080 " )
22+ @ PactBroker (host = "localhost " , port = "9292 " )
2323public class PassengerControllerContractTests {
2424
2525 @ InjectMocks
Original file line number Diff line number Diff line change 7070 <artifactId >pact-jvm-provider-maven_2.12</artifactId >
7171 <version >3.5.21</version >
7272 <configuration >
73- <pactBrokerUrl >http://192.168.99.100:9080 </pactBrokerUrl >
73+ <pactBrokerUrl >http://localhost:9292 </pactBrokerUrl >
7474 <!-- <serviceProviders>-->
7575 <!-- <serviceProvider>-->
7676 <!-- <name>passengerManagementProvider</name>-->
You can’t perform that action at this time.
0 commit comments