Conversation
2396a84 to
83ded6f
Compare
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 preferencesFootnotes
|
01655d8 to
0ac51f7
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds support for testing extensions, allowing administrators to verify extension configurations before deployment. The primary use case is providing a "test" button in the UI for immediate feedback on whether a configuration is likely to work.
Changes:
- Introduces new plugin API components (
ExtensionTestResult,ExtensionTestCheck) for representing test results - Adds a new REST API endpoint for testing extensions with runtime configuration
- Implements test functionality in the NVD vulnerability data source as a reference implementation
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| plugin/api/src/main/java/org/dependencytrack/plugin/api/ExtensionTestResult.java | New class representing test results with multiple checks |
| plugin/api/src/main/java/org/dependencytrack/plugin/api/ExtensionTestCheck.java | New record for individual test checks with status and optional message |
| plugin/api/src/main/java/org/dependencytrack/plugin/api/ExtensionFactory.java | Adds default test() method to extension factory interface |
| plugin/api/src/main/java/org/dependencytrack/plugin/api/ExtensionContext.java | Minor refactoring with null annotations and imports |
| apiserver/src/main/java/org/dependencytrack/resources/v2/ExtensionsResource.java | Implements testExtension endpoint with validation and conversion logic |
| apiserver/src/test/java/org/dependencytrack/resources/v2/ExtensionsResourceTest.java | Comprehensive integration tests for extension testing functionality |
| vuln-data-source/nvd/src/main/java/org/dependencytrack/vulndatasource/nvd/NvdVulnDataSourceFactory.java | Reference implementation testing NVD feed connectivity and format |
| vuln-data-source/nvd/src/test/java/org/dependencytrack/vulndatasource/nvd/NvdVulnDataSourceFactoryTest.java | Tests for NVD extension testing functionality |
| api/src/main/openapi/* | OpenAPI specification for new test endpoint and schema definitions |
| vuln-data-source/nvd/pom.xml | Adds WireMock dependency for testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
0ac51f7 to
cd0aeca
Compare
Allows extensions to provide functionality that lets administrators verify whether a given configuration is likely to work. The primary use case here being a "test" button in the UI. Having an easy way to test configuration provides much better UX, as the lack of feedback without it can cause a lot of frustration. Especially when the to-be-configured functionality only runs on schedule and can't be triggered manually at all. Signed-off-by: nscuro <nscuro@protonmail.com>
cd0aeca to
049a411
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 21 out of 21 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
Allows extensions to provide functionality that lets administrators verify whether a given configuration is likely to work.
The primary use case here being a "test" button in the UI.
Having an easy way to test configuration provides much better UX, as the lack of feedback without it can cause a lot of frustration. Especially when the to-be-configured functionality only runs on schedule and can't be triggered manually at all.
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 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