Skip to content

Chore: java quickstart petclinic Dockerfile and new tests added #88

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 3 additions & 11 deletions spring-petclinic/spring-petclinic-rest/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official OpenJDK runtime as a parent image
FROM openjdk:22-bookworm
FROM openjdk:25-bookworm

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

# Download the ca.crt file
RUN curl -o ca.crt https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/ca.crt

RUN curl -o setup_ca.sh https://raw.githubusercontent.com/keploy/keploy/main/pkg/core/proxy/asset/setup_ca.sh

# Give execute permission to the setup_ca.sh script
RUN chmod +x setup_ca.sh

# Run the application when the container launches
# CMD ["java", "-jar", ""]
CMD ["/bin/bash", "-c", "source ./setup_ca.sh && java -jar target/spring-petclinic-rest-3.0.2.jar"]

CMD ["java", "-jar", "target/spring-petclinic-rest-3.0.2.jar"]
28 changes: 28 additions & 0 deletions spring-petclinic/spring-petclinic-rest/docker-compose-tmp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: "3.9"
services:
java-app:
build:
context: .
container_name: javaApp
depends_on:
- mypostgres
ports:
- "9966:9966"
networks:
- keploy-network
mypostgres:
image: "postgres:15.2"
container_name: mypostgres
ports:
- "5432:5432"
networks:
- keploy-network
volumes:
- /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
environment:
POSTGRES_USER: petclinic
POSTGRES_PASSWORD: petclinic
POSTGRES_DB: petclinic
networks:
keploy-network:
external: true
114 changes: 114 additions & 0 deletions spring-petclinic/spring-petclinic-rest/keploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
# Generated by Keploy (0.11.22)
path: ""
appId: 0
appName: spring-petclinic-rest
command: docker compose up
templatize:
testSets: []
port: 0
e2e: false
dnsPort: 26789
proxyPort: 16789
debug: false
disableTele: false
disableANSI: false
containerName: javaApp
networkName: ""
buildDelay: 30
test:
selectedTests: {}
globalNoise:
global: {}
test-sets: {}
delay: 5
host: ""
port: 0
apiTimeout: 5
skipCoverage: false
coverageReportPath: ""
ignoreOrdering: true
mongoPassword: default@123
language: ""
removeUnusedMocks: false
fallBackOnMiss: false
jacocoAgentPath: ""
basePath: ""
mocking: true
ignoredTests: {}
disableLineCoverage: false
disableMockUpload: false
useLocalMock: false
updateTemplate: false
freezeTime: false
record:
filters: []
basePath: ""
recordTimer: 0s
agent: false
configPath: ""
bypassRules: []
generateGithubActions: false
keployContainer: keploy-v2
keployNetwork: keploy-network
cmdType: native
contract:
services: []
tests: []
path: ""
download: false
generate: false
driven: consumer
mappings:
servicesMapping: {}
self: s1
inCi: false
autogen:
filters: []
basePath: ""
recordTimer: 0s
schemaPath: ""
header: ""
dedup:
selectedTests: {}
globalNoise:
global: {}
test-sets: {}
delay: 0
host: ""
port: 0
apiTimeout: 0
skipCoverage: false
coverageReportPath: ""
ignoreOrdering: false
mongoPassword: ""
language: ""
removeUnusedMocks: false
fallBackOnMiss: false
jacocoAgentPath: ""
basePath: ""
mocking: true
ignoredTests: {}
disableLineCoverage: false
disableMockUpload: false
useLocalMock: false
updateTemplate: false
rm: false
freezeTime: false
generateParallel:
retryEnabled: false
cores: 0
utGen:
llmBaseUrl: ""
model: ""
llmApiVersion: ""
workflow:
installationToken: ""
coverageWorkflow: false
prWorkflow: false
repoName: ""
prNumber: 0
jwtToken: ""
InstallationID: 0
eventID: ""

# Visit [https://keploy.io/docs/running-keploy/configuration-file/] to learn about using keploy through configration file.
2 changes: 2 additions & 0 deletions spring-petclinic/spring-petclinic-rest/keploy/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/reports/
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
preScript: ""
postScript: ""
template: {}
mockRegistry:
mock: 0385cbe2e76e218cbd967f6a5a90cd08151d63a95b5cb38e71a162509068637c
app: spring-petclinic-rest
Loading