mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud)
84811: Merged PLATFORM1 (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 82464: ACE-1246 "Allow the customer to change the document encryption key" Encrypting content store git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@85170 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2010 Alfresco Software Limited.
|
||||
* Copyright (C) 2005-2014 Alfresco Software Limited.
|
||||
*
|
||||
* This file is part of Alfresco
|
||||
*
|
||||
@@ -18,6 +18,12 @@
|
||||
*/
|
||||
package org.alfresco.repo.content;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
import static org.junit.Assert.fail;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
@@ -33,6 +39,8 @@ import org.alfresco.service.cmr.repository.ContentWriter;
|
||||
import org.alfresco.test_category.OwnJVMTestsCategory;
|
||||
import org.alfresco.util.Pair;
|
||||
import org.alfresco.util.TempFileProvider;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.experimental.categories.Category;
|
||||
|
||||
/**
|
||||
@@ -54,10 +62,9 @@ public class RoutingContentStoreTest extends AbstractWritableContentStoreTest
|
||||
private ContentStore storeD;
|
||||
private ContentStore routingStore;
|
||||
|
||||
@Override
|
||||
public void setUp() throws Exception
|
||||
@Before
|
||||
public void before() throws Exception
|
||||
{
|
||||
super.setUp();
|
||||
File tempDir = TempFileProvider.getTempDir();
|
||||
// Create a subdirectory for A
|
||||
File storeADir = new File(tempDir, "A");
|
||||
@@ -80,6 +87,7 @@ public class RoutingContentStoreTest extends AbstractWritableContentStoreTest
|
||||
return routingStore;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSetUp() throws Exception
|
||||
{
|
||||
assertNotNull(routingStore);
|
||||
@@ -105,6 +113,7 @@ public class RoutingContentStoreTest extends AbstractWritableContentStoreTest
|
||||
/**
|
||||
* Checks that requests for missing content URLs are served.
|
||||
*/
|
||||
@Test
|
||||
public void testMissingUrl()
|
||||
{
|
||||
String missingContentUrl = FileContentStore.createNewFileStoreUrl();
|
||||
@@ -123,13 +132,14 @@ public class RoutingContentStoreTest extends AbstractWritableContentStoreTest
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGeneralUse()
|
||||
{
|
||||
for (int i = 0 ; i < 20; i++)
|
||||
{
|
||||
ContentContext contentContext = new ContentContext(null, null);
|
||||
ContentWriter writer = routingStore.getWriter(contentContext);
|
||||
String content = "This was generated by " + this.getClass().getName() + "#" + getName() + " number " + i;
|
||||
String content = "This was generated by " + this.getClass().getName() + "#testGeneralUse number " + i;
|
||||
writer.putContent(content);
|
||||
// Check that it exists
|
||||
String contentUrl = writer.getContentUrl();
|
||||
|
Reference in New Issue
Block a user