mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
wip: backup test
This commit is contained in:
@@ -7,6 +7,7 @@ import org.alfresco.rest.core.RestRequest;
|
||||
import org.alfresco.rest.core.RestWrapper;
|
||||
import org.alfresco.rest.model.RestHtmlResponse;
|
||||
import org.alfresco.utility.Utility;
|
||||
import org.alfresco.utility.data.DataSite;
|
||||
import org.alfresco.utility.network.ServerHealth;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@@ -26,6 +27,9 @@ public abstract class AbstractBackupTest extends AbstractTestNGSpringContextTest
|
||||
|
||||
@Autowired
|
||||
protected ServerHealth serverHealth;
|
||||
|
||||
@Autowired
|
||||
protected DataSite dataSite;
|
||||
|
||||
@Autowired
|
||||
RestWrapper restWrapper;
|
||||
|
||||
+10
-1
@@ -4,6 +4,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.core.StringContains.containsString;
|
||||
|
||||
import org.alfresco.rest.model.RestHtmlResponse;
|
||||
import org.alfresco.utility.model.SiteModel;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
@@ -16,6 +17,7 @@ import org.testng.annotations.Test;
|
||||
*/
|
||||
public class SearchServiceBackupTests extends AbstractBackupTest {
|
||||
|
||||
private SiteModel testSite = new SiteModel("siteForBackupTesting");
|
||||
/**
|
||||
* {"responseHeader":{"status":0,"QTime":1},"exception":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException:
|
||||
* Directory does not exist:
|
||||
@@ -32,10 +34,17 @@ public class SearchServiceBackupTests extends AbstractBackupTest {
|
||||
|
||||
}
|
||||
|
||||
@Test(priority=1)
|
||||
public void createTestSiteForBackup() {
|
||||
if(dataSite.isSiteCreated(testSite))
|
||||
testSite = dataSite.usingAdmin().createSite(testSite);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* In case of success: {"responseHeader":{"status":0,"QTime":3},"status":"OK"}
|
||||
*/
|
||||
@Test(priority=1)
|
||||
@Test(priority=2)
|
||||
public void save1AlfrescoSnaphotToExistingBackupFolder() throws Exception {
|
||||
RestHtmlResponse htmlResponse = executeSolrBackupRequest("alfresco", "/backup/alfresco", 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user