Skip to content

Commit

Permalink
Update authorization tests and alter the status code
Browse files Browse the repository at this point in the history
refs #359
  • Loading branch information
geso02 committed Sep 3, 2024
1 parent e4c86a9 commit 8d54bbe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ public void setThumbnailWithCorrectRoleAndPermission() throws IOException {
String accessToken = getAccessToken(DummyCredentialStore.BASYX_UPDATER_CREDENTIAL);

CloseableHttpResponse retrievalResponse = setThumbnailToAasWithAuthorization(SPECIFIC_SHELL_ID, accessToken);
assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode());
assertEquals(HttpStatus.NO_CONTENT.value(), retrievalResponse.getCode());

deleteElementWithAuthorization(BaSyxHttpTestUtils.getThumbnailAccessURL(createAasRepositoryUrl(aasRepositoryBaseUrl), SPECIFIC_SHELL_ID), getAccessToken(DummyCredentialStore.ADMIN_CREDENTIAL));
}
Expand All @@ -585,7 +585,7 @@ public void setThumbnailWithCorrectRoleAndSpecificAasPermission() throws IOExcep
String accessToken = getAccessToken(DummyCredentialStore.BASYX_UPDATER_TWO_CREDENTIAL);

CloseableHttpResponse retrievalResponse = setThumbnailToAasWithAuthorization(SPECIFIC_SHELL_ID, accessToken);
assertEquals(HttpStatus.OK.value(), retrievalResponse.getCode());
assertEquals(HttpStatus.NO_CONTENT.value(), retrievalResponse.getCode());

deleteElementWithAuthorization(BaSyxHttpTestUtils.getThumbnailAccessURL(createAasRepositoryUrl(aasRepositoryBaseUrl), SPECIFIC_SHELL_ID), getAccessToken(DummyCredentialStore.ADMIN_CREDENTIAL));
}
Expand Down

0 comments on commit 8d54bbe

Please sign in to comment.