From: Richard Millet Date: Mon, 12 Apr 2021 15:00:05 +0000 (-0700) Subject: DRYD-961: Added code to prevent more than one contact per authority term from being... X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=43346a4f7f4816ac54e1ecd6afa7a756c51460ca;p=tmp%2Fjakarta-migration.git DRYD-961: Added code to prevent more than one contact per authority term from being created. Services will now return 409 if a client attempts to create a second contact. --- diff --git a/services/IntegrationTests/src/main/resources/log4j2-surefire.xml b/services/IntegrationTests/src/main/resources/log4j2-surefire.xml new file mode 100644 index 000000000..bf74484d1 --- /dev/null +++ b/services/IntegrationTests/src/main/resources/log4j2-surefire.xml @@ -0,0 +1,34 @@ + + + + + %d %-5p [%t] [%c:%L] %m%n + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml index 42748c70f..a49b568cf 100644 --- a/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml +++ b/services/IntegrationTests/src/test/resources/test-data/xmlreplay/authority/authority.xml @@ -1,11 +1,80 @@ - + YWRtaW5AY29yZS5jb2xsZWN0aW9uc3BhY2Uub3JnOkFkbWluaXN0cmF0b3I= - + + + + 201 + POST + /cspace-services/personauthorities + authority/personauthority.xml + + + + word_1111 + word_2222 + word_3333 + word_4444 + word_555 + + stem_111 + stem_222 + stem_333 + + display_name2 + short_id_value2 + + + + 201 + POST + /cspace-services/personauthorities/${createPersonAuthority1.CSID}/items + authority/personitemWithContact1.xml + + ${createPersonAuthority1.word1} ${createPersonAuthority1.word2} + ${createPersonAuthority1.word1}item1 + A bio note for this Person. + ${createPersonAuthority1.word1}@${createPersonAuthority1.word2}.com + + + + 200 + GET + /cspace-services/personauthorities/${createPersonAuthority1.CSID}/items/${personitemWithContact1.CSID}/contacts + + + authority/res/contactItems.res.xml + + ${createPersonAuthority1.word1}@${createPersonAuthority1.word2}.com + + + + + 400 + POST + /cspace-services/personauthorities/${createPersonAuthority1.CSID}/items + authority/personitemWithContact2.xml + + ${createPersonAuthority1.word2} ${createPersonAuthority1.word2} + ${createPersonAuthority2.word2}item2 + A bio note for this Person with two contacts. + + + + 409 + POST + /cspace-services/personauthorities/${createPersonAuthority1.CSID}/items/${personitemWithContact1.CSID}/contacts + authority/contactSubresource.xml + + ${createPersonAuthority1.word1}@${createPersonAuthority1.word2}.net + + + +