Skip to content
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

Use /api/v1/event/token/{uuid} instead of /api/v1/bom/token/{uui} in e2e tests #1528

Merged
merged 3 commits into from
Sep 19, 2024
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Hyades

[![Build Status](https://github.com/DependencyTrack/hyades/actions/workflows/ci.yml/badge.svg)](https://github.com/DependencyTrack/hyades/actions/workflows/ci.yml)
[![End-to-End Test](https://github.com/DependencyTrack/hyades/actions/workflows/e2e-test.yml/badge.svg)](https://github.com/DependencyTrack/hyades/actions/workflows/e2e-test.yml)
[![Codacy Code Quality Badge](https://app.codacy.com/project/badge/Grade/64c349c2b92340ffb83f7dba1d6b03e5)](https://app.codacy.com/gh/DependencyTrack/hyades/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade)
[![Codacy Coverage Badge](https://app.codacy.com/project/badge/Coverage/64c349c2b92340ffb83f7dba1d6b03e5)](https://app.codacy.com/gh/DependencyTrack/hyades/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage)

Expand Down
14 changes: 9 additions & 5 deletions docs/getting-started/upgrading.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ Refer to the [kafka configuration reference] for details. Example of name change
|:-----------------------------------------------------------|:----------------------------------------------------|
| `alpine.kafka.processor.vuln.scan.result.processing.order` | `kafka.processor.vuln.scan.result.processing.order` |

* All deprecated endpoints mentioned below were removed:
* POST `/api/v1/policy/{policyUuid}/tag/{tagName}`
* DELETE `/api/v1/policy/{policyUuid}/tag/{tagName}`
* GET `/api/v1/tag/{policyUuid}`
* GET `/api/v1/bom/token/{uuid}`
* The endpoints deprecated in v4.x mentioned below were removed ([apiserver/#910]):

| Removed endpoint | Replacement |
|:---------------------------------------------------|:-----------------------------------|
| `POST /api/v1/policy/{policyUuid}/tag/{tagName}` | `POST /api/v1/tag/{name}/policy` |
| `DELETE /api/v1/policy/{policyUuid}/tag/{tagName}` | `DELETE /api/v1/tag/{name}/policy` |
| `GET /api/v1/tag/{policyUuid}` | `GET /api/v1/tag/policy/{uuid}` |
| `GET /api/v1/bom/token/{uuid}` | `GET /api/v1/event/token/{uuid}` |

[apiserver/#840]: https://github.com/DependencyTrack/hyades-apiserver/pull/840
[apiserver/#888]: https://github.com/DependencyTrack/hyades-apiserver/pull/888
[apiserver/#904]: https://github.com/DependencyTrack/hyades-apiserver/pull/904
[apiserver/#910]: https://github.com/DependencyTrack/hyades-apiserver/pull/910
[hyades/#1392]: https://github.com/DependencyTrack/hyades/issues/1392

[kafka configuration reference]: ../reference/configuration/api-server.md#kafka
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import jakarta.ws.rs.core.MediaType;
import org.dependencytrack.apiserver.model.Analysis;
import org.dependencytrack.apiserver.model.ApiKey;
import org.dependencytrack.apiserver.model.BomProcessingResponse;
import org.dependencytrack.apiserver.model.EventProcessingResponse;
import org.dependencytrack.apiserver.model.BomUploadRequest;
import org.dependencytrack.apiserver.model.ConfigProperty;
import org.dependencytrack.apiserver.model.CreateNotificationRuleRequest;
Expand Down Expand Up @@ -95,10 +95,10 @@ Team addPermissionToTeam(@PathParam("uuid") final UUID teamUuid,
WorkflowTokenResponse uploadBom(final BomUploadRequest request);

@GET
@Path("/bom/token/{token}")
@Path("/event/token/{token}")
@Produces(MediaType.WILDCARD)
@Consumes(MediaType.WILDCARD)
BomProcessingResponse isBomBeingProcessed(@PathParam("token") final String token);
EventProcessingResponse isEventBeingProcessed(@PathParam("token") final String token);

@PUT
@Path("/vulnerability")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

@JsonIgnoreProperties(ignoreUnknown = true)
public record BomProcessingResponse(Boolean processing) {
public record EventProcessingResponse(Boolean processing) {
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.dependencytrack.e2e;

import org.dependencytrack.apiserver.model.BomProcessingResponse;
import org.dependencytrack.apiserver.model.EventProcessingResponse;
import org.dependencytrack.apiserver.model.BomUploadRequest;
import org.dependencytrack.apiserver.model.Finding;
import org.dependencytrack.apiserver.model.Project;
Expand Down Expand Up @@ -68,7 +68,7 @@ void test() throws Exception {
.atMost(Duration.ofSeconds(30))
.pollDelay(Duration.ofMillis(250))
.untilAsserted(() -> {
final BomProcessingResponse processingResponse = apiServerClient.isBomBeingProcessed(response.token());
final EventProcessingResponse processingResponse = apiServerClient.isEventBeingProcessed(response.token());
assertThat(processingResponse.processing()).isFalse();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import com.github.tomakehurst.wiremock.junit5.WireMockExtension;
import com.icegreen.greenmail.junit5.GreenMailExtension;
import com.icegreen.greenmail.util.ServerSetup;
import org.dependencytrack.apiserver.model.BomProcessingResponse;
import org.dependencytrack.apiserver.model.EventProcessingResponse;
import org.dependencytrack.apiserver.model.BomUploadRequest;
import org.dependencytrack.apiserver.model.ConfigProperty;
import org.dependencytrack.apiserver.model.CreateNotificationRuleRequest;
Expand Down Expand Up @@ -166,7 +166,7 @@ void test() throws Exception {
.atMost(Duration.ofSeconds(15))
.pollDelay(Duration.ofMillis(250))
.untilAsserted(() -> {
final BomProcessingResponse processingResponse = apiServerClient.isBomBeingProcessed(response.token());
final EventProcessingResponse processingResponse = apiServerClient.isEventBeingProcessed(response.token());
assertThat(processingResponse.processing()).isFalse();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
package org.dependencytrack.e2e;

import org.dependencytrack.apiserver.model.BomProcessingResponse;
import org.dependencytrack.apiserver.model.EventProcessingResponse;
import org.dependencytrack.apiserver.model.BomUploadRequest;
import org.dependencytrack.apiserver.model.Finding;
import org.dependencytrack.apiserver.model.Project;
Expand Down Expand Up @@ -81,7 +81,7 @@ void test() throws Exception {
.atMost(Duration.ofSeconds(30))
.pollDelay(Duration.ofMillis(250))
.untilAsserted(() -> {
final BomProcessingResponse processingResponse = apiServerClient.isBomBeingProcessed(response.token());
final EventProcessingResponse processingResponse = apiServerClient.isEventBeingProcessed(response.token());
assertThat(processingResponse.processing()).isFalse();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.dependencytrack.apiserver.model.Analysis;
import org.dependencytrack.apiserver.model.BomProcessingResponse;
import org.dependencytrack.apiserver.model.EventProcessingResponse;
import org.dependencytrack.apiserver.model.BomUploadRequest;
import org.dependencytrack.apiserver.model.CreateNotificationRuleRequest;
import org.dependencytrack.apiserver.model.CreateVulnerabilityRequest;
Expand Down Expand Up @@ -219,7 +219,7 @@ void test() throws Exception {
.atMost(Duration.ofSeconds(15))
.pollDelay(Duration.ofMillis(250))
.untilAsserted(() -> {
final BomProcessingResponse processingResponse = apiServerClient.isBomBeingProcessed(response.token());
final EventProcessingResponse processingResponse = apiServerClient.isEventBeingProcessed(response.token());
assertThat(processingResponse.processing()).isFalse();
});

Expand Down
Loading