Skip to content

Commit 39dc503

Browse files
committed
Chore:java quickstart petclinic Dockerfile and new tests added
Signed-off-by: Achanandhi-M <[email protected]>
1 parent 5dfa57e commit 39dc503

35 files changed

+3657
-14370
lines changed
Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Use an official OpenJDK runtime as a parent image
2-
FROM openjdk:22-bookworm
2+
FROM openjdk:25-bookworm
33

44
# Set the working directory to /app
55
WORKDIR /app
@@ -16,14 +16,6 @@ RUN mvn clean install -Dmaven.test.skip=true
1616
# Expose the port the app runs on
1717
EXPOSE 9966
1818

19-
# Download the ca.crt file
20-
RUN curl -o ca.crt https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/ca.crt
21-
22-
RUN curl -o setup_ca.sh https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/setup_ca.sh
23-
24-
# Give execute permission to the setup_ca.sh script
25-
RUN chmod +x setup_ca.sh
26-
2719
# Run the application when the container launches
28-
# CMD ["java", "-jar", ""]
29-
CMD ["/bin/bash", "-c", "source ./setup_ca.sh && java -jar target/spring-petclinic-rest-3.0.2.jar"]
20+
21+
CMD ["java", "-jar", "target/spring-petclinic-rest-3.0.2.jar"]
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
version: "3.9"
2+
services:
3+
java-app:
4+
build:
5+
context: .
6+
container_name: javaApp
7+
depends_on:
8+
- mypostgres
9+
ports:
10+
- "9966:9966"
11+
networks:
12+
- keploy-network
13+
mypostgres:
14+
image: "postgres:15.2"
15+
container_name: mypostgres
16+
ports:
17+
- "5432:5432"
18+
networks:
19+
- keploy-network
20+
volumes:
21+
- /Users/achanandhi/Documents/java-quickstart-fix/samples-java/spring-petclinic/spring-petclinic-rest/src/main/resources/db/postgresql/initDB.sql:/docker-entrypoint-initdb.d/initDB.sql
22+
environment:
23+
POSTGRES_USER: petclinic
24+
POSTGRES_PASSWORD: petclinic
25+
POSTGRES_DB: petclinic
26+
networks:
27+
keploy-network:
28+
external: true
Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# Generated by Keploy (0.11.22)
2+
path: ""
3+
appId: 0
4+
appName: spring-petclinic-rest
5+
command: docker compose up
6+
templatize:
7+
testSets: []
8+
port: 0
9+
e2e: false
10+
dnsPort: 26789
11+
proxyPort: 16789
12+
debug: false
13+
disableTele: false
14+
disableANSI: false
15+
containerName: javaApp
16+
networkName: ""
17+
buildDelay: 30
18+
test:
19+
selectedTests: {}
20+
globalNoise:
21+
global: {}
22+
test-sets: {}
23+
delay: 5
24+
host: ""
25+
port: 0
26+
apiTimeout: 5
27+
skipCoverage: false
28+
coverageReportPath: ""
29+
ignoreOrdering: true
30+
mongoPassword: default@123
31+
language: ""
32+
removeUnusedMocks: false
33+
fallBackOnMiss: false
34+
jacocoAgentPath: ""
35+
basePath: ""
36+
mocking: true
37+
ignoredTests: {}
38+
disableLineCoverage: false
39+
disableMockUpload: false
40+
useLocalMock: false
41+
updateTemplate: false
42+
freezeTime: false
43+
record:
44+
filters: []
45+
basePath: ""
46+
recordTimer: 0s
47+
agent: false
48+
configPath: ""
49+
bypassRules: []
50+
generateGithubActions: false
51+
keployContainer: keploy-v2
52+
keployNetwork: keploy-network
53+
cmdType: native
54+
contract:
55+
services: []
56+
tests: []
57+
path: ""
58+
download: false
59+
generate: false
60+
driven: consumer
61+
mappings:
62+
servicesMapping: {}
63+
self: s1
64+
inCi: false
65+
autogen:
66+
filters: []
67+
basePath: ""
68+
recordTimer: 0s
69+
schemaPath: ""
70+
header: ""
71+
dedup:
72+
selectedTests: {}
73+
globalNoise:
74+
global: {}
75+
test-sets: {}
76+
delay: 0
77+
host: ""
78+
port: 0
79+
apiTimeout: 0
80+
skipCoverage: false
81+
coverageReportPath: ""
82+
ignoreOrdering: false
83+
mongoPassword: ""
84+
language: ""
85+
removeUnusedMocks: false
86+
fallBackOnMiss: false
87+
jacocoAgentPath: ""
88+
basePath: ""
89+
mocking: true
90+
ignoredTests: {}
91+
disableLineCoverage: false
92+
disableMockUpload: false
93+
useLocalMock: false
94+
updateTemplate: false
95+
rm: false
96+
freezeTime: false
97+
generateParallel:
98+
retryEnabled: false
99+
cores: 0
100+
utGen:
101+
llmBaseUrl: ""
102+
model: ""
103+
llmApiVersion: ""
104+
workflow:
105+
installationToken: ""
106+
coverageWorkflow: false
107+
prWorkflow: false
108+
repoName: ""
109+
prNumber: 0
110+
jwtToken: ""
111+
InstallationID: 0
112+
eventID: ""
113+
114+
# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
/reports/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
preScript: ""
2+
postScript: ""
3+
template: {}
4+
mockRegistry:
5+
mock: 0385cbe2e76e218cbd967f6a5a90cd08151d63a95b5cb38e71a162509068637c
6+
app: spring-petclinic-rest

0 commit comments

Comments
 (0)