Skip to content

Commit

Permalink
Small useful changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
bmg13 committed Jan 29, 2025
1 parent 9b8614c commit 7731093
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ public VersionServiceStub(ResponseQueue responseQueue) {

@Override
public CompletableFuture<StatusResult<byte[]>> requestVersions(ProtocolVersionRequest request) {
var response = responseQueue.getNext(byte[].class, "Error retrieving VersionService status result: %s");
return CompletableFuture.completedFuture(StatusResult.success(response.getContent()));
var nextInQueue = responseQueue.getNext(byte[].class, "Error retrieving VersionService status result: %s");
var result = StatusResult.success(nextInQueue.getContent());
return CompletableFuture.completedFuture(result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ void test_apiNotAuthenticated_expect400() {
@Test
void test_getProtocolVersions() {
setupNextResponse("versions.request.json");
var responseBody = mgmtRequest()
mgmtRequest()
.contentType(ContentType.JSON)
.body("""
{
Expand All @@ -136,10 +136,7 @@ void test_getProtocolVersions() {
.post("/v4alpha/protocol-versions/request")
.then()
.log().ifError()
.statusCode(200)
.extract().body();

assertThat(responseBody != null);
.statusCode(200);
}

private void setupNextResponse(String resourceFileName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,12 @@
"input": {
"class": "org.eclipse.edc.connector.controlplane.catalog.spi.CatalogRequest",
"data": {
"@context": {
"@vocab": "https://w3id.org/edc/v0.0.1/ns/",
"edc": "https://w3id.org/edc/v0.0.1/ns/"
},
"@type": "ProtocolVersionRequest",
"https://w3id.org/edc/v0.0.1/ns/counterPartyAddress": "http://provider-control-plane:8282/api/v1/dsp",
"https://w3id.org/edc/v0.0.1/ns/counterPartyId": "providerId",
"https://w3id.org/edc/v0.0.1/ns/protocol": "dataspace-protocol-http",
"querySpec": {
"offset": 0,
"limit": 50,
"sortOrder": "DESC",
"sortField": "fieldName",
"filterExpression": []
}
"offset": 0,
"sortOrder": "DESC"
}
},
"output": {
"class": "java.lang.Object",
"data": {
}
"class": "java.util.concurrent.CompletableFuture",
"data": {}
}
}

0 comments on commit 7731093

Please sign in to comment.