From a48620eca429ab0e363bf8eb391b8fa7fed3a3e0 Mon Sep 17 00:00:00 2001 From: garaimanoj Date: Fri, 18 Oct 2024 15:25:20 +0000 Subject: [PATCH] Fix test --- .../mw/iam/test/api/aup/AupSignatureIntegrationTests.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/iam-login-service/src/test/java/it/infn/mw/iam/test/api/aup/AupSignatureIntegrationTests.java b/iam-login-service/src/test/java/it/infn/mw/iam/test/api/aup/AupSignatureIntegrationTests.java index bac4a5c35..a6bd1e6ba 100644 --- a/iam-login-service/src/test/java/it/infn/mw/iam/test/api/aup/AupSignatureIntegrationTests.java +++ b/iam-login-service/src/test/java/it/infn/mw/iam/test/api/aup/AupSignatureIntegrationTests.java @@ -441,9 +441,7 @@ public void signAupOnBehalfOfUserThatHasNoSignature() throws Exception { @Test @WithMockUser(username = "test", roles = {"USER"}) public void testSignAupThrowExceptionForServiceAccount() throws Exception { - IamAup aup = buildDefaultAup(); - aupRepo.save(aup); - + IamAccount testAccount = accountRepo.findByUsername("test").orElseThrow(); testAccount.setServiceAccount(true); accountRepo.save(testAccount);