Conversation
There was a problem hiding this comment.
Pull request overview
This PR ports end-to-end tests from the hyades repository into the main project. It introduces a new e2e Maven module that uses Testcontainers to spin up PostgreSQL and the API server, with Feign for API interaction, WireMock for webhook verification, and GreenMail for email testing.
Changes:
- Adds a new
e2eMaven module with an abstract base test class, Feign-based API client, model records, and five e2e test classes covering BOM upload processing, vulnerability analysis (internal, Snyk, OSS Index), notification workflows, and vulnerability policies. - Adds OpenFeign BOM to the parent
pom.xmldependency management. - Adds Makefile target and documentation for running e2e tests.
Reviewed changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pom.xml | Adds e2e module and OpenFeign BOM to dependency management |
| e2e/pom.xml | New module POM with test dependencies and failsafe plugin config |
| e2e/src/main/java/.../api/ApiClient.java | Feign API client interface for DT API |
| e2e/src/main/java/.../api/ApiAuthInterceptor.java | Auth interceptor supporting bearer token and API key |
| e2e/src/main/java/.../api/CompositeDecoder.java | Response decoder with JSON and text support |
| e2e/src/main/java/.../api/CompositeEncoder.java | Request encoder with JSON and form-urlencoded support |
| e2e/src/main/java/.../api/model/*.java | Record classes for API request/response models |
| e2e/src/test/java/.../AbstractE2ET.java | Base test class managing containers and API client setup |
| e2e/src/test/java/.../BomUploadProcessingE2ET.java | E2E test for BOM upload with webhook and email notifications |
| e2e/src/test/java/.../BomUploadSnykAnalysisE2ET.java | E2E test for Snyk vulnerability analysis |
| e2e/src/test/java/.../BomUploadOssIndexAnalysisE2ET.java | E2E test for OSS Index vulnerability analysis |
| e2e/src/test/java/.../BomProcessedNotificationDelayedE2ET.java | E2E test for delayed BOM_PROCESSED notifications |
| e2e/src/test/java/.../VulnerabilityPolicyE2ET.java | E2E test for vulnerability policy lifecycle |
| e2e/src/test/resources/* | Test resources (BOM file, logger config) |
| Makefile | Adds test-e2e target |
| DEVELOPING.md, AGENTS.md | Documents e2e test execution |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
It has been migrated to the API server repository via DependencyTrack/hyades-apiserver#1884. Signed-off-by: nscuro <nscuro@protonmail.com>
Signed-off-by: nscuro <nscuro@protonmail.com>
It has been migrated to the API server repository via DependencyTrack/hyades-apiserver#1884. Signed-off-by: nscuro <nscuro@protonmail.com>
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
Description
Ports e2e tests from hyades repository.
Addressed Issue
N/A
Additional Details
N/A
Checklist
This PR fixes a defect, and I have provided tests to verify that the fix is effectiveThis PR implements an enhancement, and I have provided tests to verify that it works as intendedThis PR introduces changes to the database model, and I have updated the migration changelog accordinglyThis PR introduces new or alters existing behavior, and I have updated the documentation accordingly