Skip to content

Commit

Permalink
build(deps): Bump EDC to 0.3.1 (#195)
Browse files Browse the repository at this point in the history
* build(deps): Bump EDC to 0.3.1

* cleanup unused stuff
  • Loading branch information
ndr-brt authored Oct 12, 2023
1 parent 0b02bc6 commit 7801445
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 114 deletions.
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

2 changes: 0 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml

This file was deleted.

27 changes: 0 additions & 27 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

26 changes: 0 additions & 26 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

8 changes: 5 additions & 3 deletions 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.2.1"
edc = "0.3.1"

assertj = "3.24.2"
awaitility = "4.2.0"
Expand All @@ -19,6 +19,8 @@ edc-core-util = { module = "org.eclipse.edc:util", version.ref = "edc" }
edc-core-boot = { module = "org.eclipse.edc:boot", version.ref = "edc" }
edc-core-connector = { module = "org.eclipse.edc:connector-core", version.ref = "edc" }
edc-core-controlplane = { module = "org.eclipse.edc:control-plane-core", version.ref = "edc" }
edc-core-controlplane-api = { module = "org.eclipse.edc:control-plane-api", version.ref = "edc" }
edc-core-controlplane-api-client = { module = "org.eclipse.edc:control-plane-api-client", version.ref = "edc" }
edc-core-dpf-selector = { module = "org.eclipse.edc:data-plane-selector-core", version.ref = "edc" }
edc-core-policy-engine = { module = "org.eclipse.edc:policy-engine", version.ref = "edc" }
edc-core-micrometer = { module = "org.eclipse.edc:micrometer-core", version.ref = "edc" }
Expand All @@ -43,7 +45,7 @@ edc-ext-vault-filesystem = { module = "org.eclipse.edc:vault-filesystem", versio
edc-ext-dpf-api = { module = "org.eclipse.edc:data-plane-api", version.ref = "edc" }
edc-ext-dpf-client = { module = "org.eclipse.edc:data-plane-client", version.ref = "edc" }
edc-ext-dpf-http = { module = "org.eclipse.edc:data-plane-http", version.ref = "edc" }
edc-ext-dpf-core = { module = "org.eclipse.edc:data-plane-framework", version.ref = "edc" }
edc-ext-dpf-core = { module = "org.eclipse.edc:data-plane-core", version.ref = "edc" }
edc-ext-dpf-selector-client = { module = "org.eclipse.edc:data-plane-selector-client", version.ref = "edc" }
edc-ext-dpf-selector-api = { module = "org.eclipse.edc:data-plane-selector-api", version.ref = "edc" }
edc-ext-transfer-dpf = { module = "org.eclipse.edc:transfer-data-plane", version.ref = "edc" }
Expand Down Expand Up @@ -90,4 +92,4 @@ transfer-dpf = ["edc-ext-transfer-dpf", "edc-ext-dpf-client", "edc-ext-dpf-selec
dpf = ["edc-ext-dpf-api", "edc-ext-dpf-http", "edc-ext-dpf-core", "edc-azure-ext-dpf-storage"]

[plugins]
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }
2 changes: 2 additions & 0 deletions launchers/connector/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ dependencies {

runtimeOnly(libs.bundles.connector)
runtimeOnly(libs.edc.core.controlplane)
runtimeOnly(libs.edc.core.controlplane.api)
runtimeOnly(libs.edc.core.controlplane.api.client)
runtimeOnly(libs.edc.ext.api.management)
runtimeOnly(libs.edc.ext.api.management.config)
runtimeOnly(libs.edc.ext.configuration.filesystem)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,19 @@ public Stream<? extends Arguments> provideArguments(ExtensionContext extensionCo

private ThrowingConsumer<CredentialEnvelope> vcRequirements(String name, String value) {
return envelope -> {
var vcResult = envelope.toVerifiableCredential(TYPE_MANAGER.getMapper());
var vcResult = envelope.toVerifiableCredentials(TYPE_MANAGER.getMapper());
assertThat(vcResult.succeeded()).isTrue();
var credential = vcResult.getContent().getItem();
assertThat(credential.getIssuer()).as("Issuer is a Web DID").startsWith("did:web:");
assertThat(credential.getCredentialSubject().getId()).as("Subject is a Web DID").startsWith("did:web:");
assertThat(credential.getCredentialSubject().getClaims())
.extractingByKey(name)
.satisfies(o -> {
assertThat(o).isInstanceOf(String.class);
assertThat((String) o).isEqualTo(value);
});
assertThat(vcResult.getContent()).allSatisfy(verifiable -> {
var credential = verifiable.getItem();
assertThat(credential.getIssuer()).as("Issuer is a Web DID").startsWith("did:web:");
assertThat(credential.getCredentialSubject().getId()).as("Subject is a Web DID").startsWith("did:web:");
assertThat(credential.getCredentialSubject().getClaims())
.extractingByKey(name)
.satisfies(o -> {
assertThat(o).isInstanceOf(String.class);
assertThat((String) o).isEqualTo(value);
});
});
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import io.gatling.javaapi.core.ChainBuilder;
import io.gatling.javaapi.core.Session;
import io.gatling.javaapi.http.HttpRequestActionBuilder;
import org.eclipse.edc.connector.contract.spi.ContractId;
import org.eclipse.edc.connector.contract.spi.ContractOfferId;
import org.eclipse.edc.connector.contract.spi.types.negotiation.ContractNegotiationStates;
import org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates;
import org.eclipse.edc.spi.types.TypeManager;
Expand Down Expand Up @@ -58,7 +58,7 @@ public abstract class TransferSimulationUtils {
public static final String TRANSFER_SUCCESSFUL = "Transfer successful";

// Related to Postman seed data
public static final ContractId CONTRACT_DEFINITION_ID = ContractId.create("def-test-document_company1", "test-document_company1");
public static final ContractOfferId CONTRACT_OFFER_ID = ContractOfferId.create("def-test-document_company1", "test-document_company1");

private TransferSimulationUtils() {
}
Expand Down Expand Up @@ -87,9 +87,9 @@ private static HttpRequestActionBuilder sendNegotiationRequest(String providerDs
// TODO: this policy must be retrieve from a call to the catalog
var policy = Map.of(
"@context", Map.of("odrl", "http://www.w3.org/ns/odrl/2/"),
"@id", CONTRACT_DEFINITION_ID.toString(),
"@id", CONTRACT_OFFER_ID.toString(),
"@type", "odrl:Set",
"odrl:target", CONTRACT_DEFINITION_ID.assetIdPart()
"odrl:target", CONTRACT_OFFER_ID.assetIdPart()
);
var request = Map.of(
TYPE, EDC_NAMESPACE + "NegotiationInitiateRequestDto",
Expand All @@ -99,8 +99,8 @@ private static HttpRequestActionBuilder sendNegotiationRequest(String providerDs
EDC_NAMESPACE + "connectorAddress", providerDspAddress,
EDC_NAMESPACE + "protocol", "dataspace-protocol-http",
EDC_NAMESPACE + "offer", Map.of(
EDC_NAMESPACE + "offerId", CONTRACT_DEFINITION_ID.toString(),
EDC_NAMESPACE + "assetId", CONTRACT_DEFINITION_ID.assetIdPart(),
EDC_NAMESPACE + "offerId", CONTRACT_OFFER_ID.toString(),
EDC_NAMESPACE + "assetId", CONTRACT_OFFER_ID.assetIdPart(),
EDC_NAMESPACE + "policy", policy
));

Expand Down Expand Up @@ -133,7 +133,7 @@ private static HttpRequestActionBuilder initiateTransfer(TransferRequestFactory
.post("/v2/transferprocesses")
.body(StringBody(session -> requestFactory.apply(new TransferInitiationData(
providerDspUrl,
CONTRACT_DEFINITION_ID.assetIdPart(),
CONTRACT_OFFER_ID.assetIdPart(),
session.getString(CONTRACT_AGREEMENT_ID)))))
.asJson()
.check(status().is(200))
Expand Down

0 comments on commit 7801445

Please sign in to comment.