chibenwa commented on code in PR #2419: URL: https://github.com/apache/james-project/pull/2419#discussion_r1775229456
########## server/mailet/integration-testing/src/test/java/org/apache/james/mailets/SubAddressingTest.java: ########## @@ -113,90 +115,21 @@ void subAddressedEmailShouldBeDeliveredInINBOXWhenNobodyHasRight(@TempDir File t assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("OK GETACL"); // do not give posting rights - testIMAPClient.sendCommand("SETACL " + TARGETED_MAILBOX + " " + "anybody" + " -p"); + testIMAPClient.sendCommand("SETACL " + TARGETED_MAILBOX + " " + "anyone" + " -p"); assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("\"any\" \"owner\""); sendSubAddressedMail(); awaitSubAddressedMail(MailboxConstants.INBOX); } @Test - void subAddressedEmailShouldBeDeliveredInSpecifiedFolderWhenAnybodyHasRight(@TempDir File temporaryFolder) throws Exception { + void subAddressedEmailShouldBeDeliveredInSpecifiedFolderWhenAnyoneHasRight(@TempDir File temporaryFolder) throws Exception { setup(temporaryFolder); - // create mailbox - testIMAPClient.sendCommand("CREATE " + TARGETED_MAILBOX); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("OK GETACL"); - - // give posting rights for anybody - testIMAPClient.sendCommand("SETACL " + TARGETED_MAILBOX + " " + "anybody" + " +p"); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("\"anybody\" \"p\""); - - sendSubAddressedMail(); - awaitSubAddressedMail(TARGETED_MAILBOX); - } - - @Test - void subAddressedEmailShouldBeDeliveredInSpecifiedFolderWhenSenderIsWhitelisted(@TempDir File temporaryFolder) throws Exception { - setup(temporaryFolder); - - // create mailbox - testIMAPClient.sendCommand("CREATE " + TARGETED_MAILBOX); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("OK GETACL"); - - // whitelist sender 1 and send from sender 1 - testIMAPClient.sendCommand("SETACL " + TARGETED_MAILBOX + " " + FROM + " +p"); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("\"u...@james.org\" \"p\""); - - sendSubAddressedMail(); - awaitSubAddressedMail(TARGETED_MAILBOX); - } - - @Test - void subAddressedEmailShouldBeDeliveredInINBOXWhenSenderIsNotWhitelisted(@TempDir File temporaryFolder) throws Exception { - setup(temporaryFolder); - - // create mailbox testIMAPClient.sendCommand("CREATE " + TARGETED_MAILBOX); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("OK GETACL"); - - // whitelist sender 2 and send from sender 1 - testIMAPClient.sendCommand("SETACL " + TARGETED_MAILBOX + " " + FROM2 + " +p"); - assertThat(testIMAPClient.sendCommand("GETACL " + TARGETED_MAILBOX)).contains("\"us...@james.org\" \"p\""); - - sendSubAddressedMail(); - awaitSubAddressedMail(MailboxConstants.INBOX); - } - - @Test - void subAddressedEmailShouldBeDeliveredInINBOXWhenSenderIsBlacklisted(@TempDir File temporaryFolder) throws Exception { Review Comment: No, the intermediate assertions have nothing to do with SubAdressing but the overall test looks ok. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@james.apache.org For additional commands, e-mail: notifications-h...@james.apache.org