Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ public void removeSubmodelReferenceWithCorrectRoleAndPermission() throws IOExcep
String accessToken = getAccessToken(DummyCredentialStore.BASYX_ASSET_UPDATER_CREDENTIAL);

CloseableHttpResponse retrievalResponse = deleteElementWithAuthorization(getSpecificSubmodelReferenceUrl(SPECIFIC_SHELL_ID_2, "http://i40.customer.com/type/1/1/testSubmodel"), accessToken);
assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode());
assertEquals(HttpStatus.NO_CONTENT.value(), retrievalResponse.getCode());

deleteElementWithAuthorization(getSpecificAasAccessURL(SPECIFIC_SHELL_ID_2), getAccessToken(DummyCredentialStore.ADMIN_CREDENTIAL));
}
Expand All @@ -439,7 +439,7 @@ public void removeSubmodelReferenceWithCorrectRoleAndSpecificAasPermission() thr
String accessToken = getAccessToken(DummyCredentialStore.BASYX_ASSET_UPDATER_TWO_CREDENTIAL);

CloseableHttpResponse retrievalResponse = deleteElementWithAuthorization(getSpecificSubmodelReferenceUrl(SPECIFIC_SHELL_ID_2, "http://i40.customer.com/type/1/1/testSubmodel"), accessToken);
assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode());
assertEquals(HttpStatus.NO_CONTENT.value(), retrievalResponse.getCode());

deleteElementWithAuthorization(getSpecificAasAccessURL(SPECIFIC_SHELL_ID_2), getAccessToken(DummyCredentialStore.ADMIN_CREDENTIAL));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public ResponseEntity<Void> putAssetAdministrationShellById(
@Override
public ResponseEntity<Void> deleteSubmodelReferenceByIdAasRepository(Base64UrlEncodedIdentifier aasIdentifier, Base64UrlEncodedIdentifier submodelIdentifier) {
aasRepository.removeSubmodelReference(aasIdentifier.getIdentifier(), submodelIdentifier.getIdentifier());
return new ResponseEntity<Void>(HttpStatus.OK);
return new ResponseEntity<Void>(HttpStatus.NO_CONTENT);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ public void removeSubmodelReference() throws FileNotFoundException, IOException,
CloseableHttpResponse deleteResponse = BaSyxHttpTestUtils.executeDeleteOnURL(url);
CloseableHttpResponse getResponse = BaSyxHttpTestUtils.executeGetOnURL(getSpecificAasSubmodelRefAccessURL(dummyAasId));

assertEquals(200, deleteResponse.getCode());
assertEquals(204, deleteResponse.getCode());

String response = BaSyxHttpTestUtils.getResponseAsString(getResponse);
BaSyxHttpTestUtils.assertSameJSONContent(getSMReferenceRemovalJson(), getJSONWithoutCursorInfo(response));
Expand Down