diff --git a/code/gms-backend/src/test/java/io/github/gms/controller/security/KeystoreAdminRoleSecurityTest.java b/code/gms-backend/src/test/java/io/github/gms/controller/security/KeystoreAdminRoleSecurityTest.java index 629695f8..71f88030 100644 --- a/code/gms-backend/src/test/java/io/github/gms/controller/security/KeystoreAdminRoleSecurityTest.java +++ b/code/gms-backend/src/test/java/io/github/gms/controller/security/KeystoreAdminRoleSecurityTest.java @@ -1,6 +1,7 @@ package io.github.gms.controller.security; import io.github.gms.abstraction.AbstractAdminRoleSecurityTest; +import io.github.gms.secure.dto.GetSecureValueDto; import io.github.gms.secure.dto.IdNamePairListDto; import io.github.gms.secure.dto.KeystoreDto; import io.github.gms.secure.dto.KeystoreListDto; @@ -49,11 +50,13 @@ void testListFailWithHttp403() { @Test void testGetValueFailWithHttp403() { - HttpEntity requestEntity = new HttpEntity<>(TestUtils.getHttpHeaders(jwt)); + GetSecureValueDto dto = new GetSecureValueDto(); + dto.setEntityId(DemoData.KEYSTORE_ID); + HttpEntity requestEntity = new HttpEntity<>(dto, TestUtils.getHttpHeaders(jwt)); // assert HttpClientErrorException.Forbidden exception = assertThrows(HttpClientErrorException.Forbidden.class, () -> - executeHttpGet("/secure/keystore/value/" + DemoData.KEYSTORE_ID, requestEntity, String.class)); + executeHttpPost("/secure/keystore/value", requestEntity, String.class)); assertTrue(exception.getMessage().startsWith("403")); }