Skip to content

Commit

Permalink
chore: fix compatibility tests + EDC version bump (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
wolf4ood authored Jan 17, 2025
1 parent becfbcb commit 0aca021
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 26 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.stable.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
format.version = "1.1"

[versions]
edc = "0.10.1"
edc = "0.11.0"
postgres = "42.7.4"

# add here
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
format.version = "1.1"

[versions]
edc = "0.11.0-SNAPSHOT"
edc = "0.12.0-SNAPSHOT"
postgres = "42.7.4"
jakarta-json = "2.1.3"
jackson = "2.18.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public void pullData(DataAddress edr, Map<String, String> queryParams, ThrowingC
public void waitForDataPlane() {
await().atMost(timeout)
.untilAsserted(() -> {
var jp = managementEndpoint.baseRequest()
var jp = baseManagementRequest()
.get("/v3/dataplanes")
.then()
.statusCode(200)
Expand All @@ -97,7 +97,7 @@ public void waitForDataPlane() {
* @return The cached {@link DataAddress}
*/
public DataAddress getEdr(String transferProcessId) {
var dataAddressRaw = managementEndpoint.baseRequest()
var dataAddressRaw = baseManagementRequest()
.contentType(JSON)
.when()
.get("/v3/edrs/{id}/dataaddress", transferProcessId)
Expand Down Expand Up @@ -127,6 +127,6 @@ public static class Builder<P extends BaseParticipant, B extends Participant.Bui
protected Builder(P participant) {
super(participant);
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

package org.eclipse.edc.compatibility.tests.fixtures;

import java.net.URI;
import java.util.HashMap;
import java.util.Map;

Expand All @@ -35,15 +34,15 @@ public Map<String, String> controlPlaneConfiguration() {
put("edc.api.auth.key", API_KEY);
put("web.http.port", String.valueOf(controlPlaneDefault.getPort()));
put("web.http.path", "/api");
put("web.http.protocol.port", String.valueOf(protocolEndpoint.getUrl().getPort()));
put("web.http.protocol.path", protocolEndpoint.getUrl().getPath());
put("web.http.management.port", String.valueOf(managementEndpoint.getUrl().getPort()));
put("web.http.management.path", managementEndpoint.getUrl().getPath());
put("web.http.protocol.port", String.valueOf(controlPlaneProtocol.get().getPort()));
put("web.http.protocol.path", controlPlaneProtocol.get().getPath());
put("web.http.management.port", String.valueOf(controlPlaneManagement.get().getPort()));
put("web.http.management.path", controlPlaneManagement.get().getPath());
put("web.http.version.port", String.valueOf(controlPlaneVersion.getPort()));
put("web.http.version.path", controlPlaneVersion.getPath());
put("web.http.control.port", String.valueOf(controlPlaneControl.getPort()));
put("web.http.control.path", controlPlaneControl.getPath());
put("edc.dsp.callback.address", protocolEndpoint.getUrl().toString());
put("edc.dsp.callback.address", controlPlaneProtocol.get().toString());
put("edc.transfer.proxy.endpoint", dataPlanePublic.toString());
put("edc.transfer.send.retry.limit", "1");
put("edc.transfer.send.retry.base-delay.ms", "100");
Expand Down Expand Up @@ -110,10 +109,9 @@ public static Builder newInstance() {

@Override
public LocalParticipant build() {
var headers = Map.of("x-api-key", API_KEY);
super.managementEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/api/management"), headers));
super.protocolEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/protocol")));
super.build();
var headers = Map.of("x-api-key", API_KEY);
participant.enrichManagementRequest = req -> req.headers(headers);
return participant;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@

package org.eclipse.edc.compatibility.tests.fixtures;

import java.net.URI;
import java.util.HashMap;
import java.util.Map;

import static org.eclipse.edc.util.io.Ports.getFreePort;

public class RemoteParticipant extends BaseParticipant {

private static final String API_KEY = "password";
Expand All @@ -31,15 +28,15 @@ public Map<String, String> controlPlaneEnv() {
put("EDC_API_AUTH_KEY", API_KEY);
put("WEB_HTTP_PORT", String.valueOf(controlPlaneDefault.getPort()));
put("WEB_HTTP_PATH", "/api");
put("WEB_HTTP_PROTOCOL_PORT", String.valueOf(protocolEndpoint.getUrl().getPort()));
put("WEB_HTTP_PROTOCOL_PATH", protocolEndpoint.getUrl().getPath());
put("WEB_HTTP_MANAGEMENT_PORT", String.valueOf(managementEndpoint.getUrl().getPort()));
put("WEB_HTTP_MANAGEMENT_PATH", managementEndpoint.getUrl().getPath());
put("WEB_HTTP_PROTOCOL_PORT", String.valueOf(controlPlaneProtocol.get().getPort()));
put("WEB_HTTP_PROTOCOL_PATH", controlPlaneProtocol.get().getPath());
put("WEB_HTTP_MANAGEMENT_PORT", String.valueOf(controlPlaneManagement.get().getPort()));
put("WEB_HTTP_MANAGEMENT_PATH", controlPlaneManagement.get().getPath());
put("WEB_HTTP_VERSION_PORT", String.valueOf(controlPlaneVersion.getPort()));
put("WEB_HTTP_VERSION_PATH", controlPlaneVersion.getPath());
put("WEB_HTTP_CONTROL_PORT", String.valueOf(controlPlaneControl.getPort()));
put("WEB_HTTP_CONTROL_PATH", controlPlaneControl.getPath());
put("EDC_DSP_CALLBACK_ADDRESS", protocolEndpoint.getUrl().toString());
put("EDC_DSP_CALLBACK_ADDRESS", controlPlaneProtocol.get().toString());
put("EDC_DATASOURCE_DEFAULT_URL", "jdbc:postgresql://localhost:5432/%s".formatted(getId()));
put("EDC_DATASOURCE_DEFAULT_USER", "postgres");
put("EDC_DATASOURCE_DEFAULT_PASSWORD", "password");
Expand Down Expand Up @@ -85,13 +82,12 @@ protected Builder() {
public static Builder newInstance() {
return new Builder();
}

@Override
public RemoteParticipant build() {
var headers = Map.of("x-api-key", API_KEY);
super.managementEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/api/management"), headers));
super.protocolEndpoint(new Endpoint(URI.create("http://localhost:" + getFreePort() + "/protocol")));
super.build();
var headers = Map.of("x-api-key", API_KEY);
participant.enrichManagementRequest = req -> req.headers(headers);
return participant;
}
}
Expand Down

0 comments on commit 0aca021

Please sign in to comment.