From 8d54bbedf8c1d7895d41a3c873be02a814ec6764 Mon Sep 17 00:00:00 2001 From: geso02 Date: Tue, 3 Sep 2024 16:31:53 +0200 Subject: [PATCH] Update authorization tests and alter the status code refs #359 --- .../feature/authorization/TestAuthorizedAasRepository.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basyx.aasrepository/basyx.aasrepository-feature-authorization/src/test/java/org/eclipse/digitaltwin/basyx/aasrepository/feature/authorization/TestAuthorizedAasRepository.java b/basyx.aasrepository/basyx.aasrepository-feature-authorization/src/test/java/org/eclipse/digitaltwin/basyx/aasrepository/feature/authorization/TestAuthorizedAasRepository.java index 4533bd801..76d503397 100644 --- a/basyx.aasrepository/basyx.aasrepository-feature-authorization/src/test/java/org/eclipse/digitaltwin/basyx/aasrepository/feature/authorization/TestAuthorizedAasRepository.java +++ b/basyx.aasrepository/basyx.aasrepository-feature-authorization/src/test/java/org/eclipse/digitaltwin/basyx/aasrepository/feature/authorization/TestAuthorizedAasRepository.java @@ -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)); } @@ -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)); }