[AGS/S3]Moving records between buckets in S3 (also possible moving records between stores-filecontenstore) fails
--revert
This commit is contained in:
estan
2020-11-23 14:42:44 +02:00
parent 56654dd7eb
commit 958f3760f5
2 changed files with 10 additions and 58 deletions

View File

@@ -132,28 +132,4 @@ public class RecordAspectUnitTest
verify(mockExtendedSecurityService, times(1)).remove(COPY_REF);
verify(mockContentBinDuplicationUtility, times(1)).duplicate(COPY_REF);
}
/**
* Check that no exception is thrown when moving record between stores
*/
@Test
public void testOnUpdatePropertiesContentMovedToAnotherStore()
{
Map<QName, Serializable> before = ImmutableMap.of(PROP_CONTENT, new ContentData("dummyContentUrl1", "text" +
"/plain", 0L, "UTF-8", Locale.UK));
Map<QName, Serializable> after = ImmutableMap.of(PROP_CONTENT, new ContentData("dummyContentUrl2", "text" +
"/plain", 0L, "UTF-8", Locale.UK), PROP_STORE_NAME, "store2");
recordAspect.onUpdateProperties(NODE_REF, before, after);
}
/**
* Check that an IntegrityException is thrown when content is changed
*/
@Test(expected = IntegrityException.class)
public void testOnUpdatePropertiesContentChanged()
{
Map<QName, Serializable> before = ImmutableMap.of(PROP_CONTENT, new ContentData("dummyContentUrl", "text/plain", 0L, "UTF-8", Locale.UK));
Map<QName, Serializable> after = ImmutableMap.of(PROP_CONTENT, new ContentData("dummyContentUrl2", "text/plain", 0L, "UTF-8", Locale.UK));
recordAspect.onUpdateProperties(NODE_REF, before, after);
}
}