wip: backup test

This commit is contained in:
Paul Brodner
2019-02-21 11:14:26 +02:00
parent 8a9415f486
commit 90ed4a82e4
2 changed files with 14 additions and 1 deletions
@@ -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;
@@ -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);