From e8c6663b3bc4198b850975239c121fef52eb0c05 Mon Sep 17 00:00:00 2001 From: Maciej Pichura <41297682+mpichura@users.noreply.github.com> Date: Mon, 30 Oct 2023 08:30:21 +0100 Subject: [PATCH] ACS-5799 re-enabling PATH related E2E tests (#2617) * ACS-5799: Re-enabling PATH query related E2E tests. * ACS-5799: Re-enabling PATH query related E2E tests. --- .../ElasticsearchPathIndexingTests.java | 18 ++++++------------ .../ElasticsearchReindexingTests.java | 4 +--- 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchPathIndexingTests.java b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchPathIndexingTests.java index 78d13fb8df..e8335bed88 100644 --- a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchPathIndexingTests.java +++ b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchPathIndexingTests.java @@ -18,7 +18,6 @@ import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.network.ServerHealth; import org.alfresco.utility.report.log.Step; -import org.junit.Ignore; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; @@ -92,16 +91,14 @@ public void testRelativePathQuery() searchQueryService.expectResultsFromQuery(query, testUser, testFileName); } - @Test(groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test(groups = TestGroup.SEARCH) public void testRelativePathQueryWithoutPrefixes() { SearchRequest query = req("PATH:\"//" + testFileName + "\" AND name:*"); searchQueryService.expectResultsFromQuery(query, testUser, testFileName); } - @Test(groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test(groups = TestGroup.SEARCH) public void testWildcardQuery() { // The test file should be the only descendent of the last folder. @@ -125,11 +122,10 @@ public void testAbsolutePathQuery() searchQueryService.expectResultsFromQuery(query, testUser, testFileName); } - @Test(groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test(groups = TestGroup.SEARCH) public void testAbsolutePathQueryWithoutPrefixes() { - String folderPath = testFolders.stream().map(folder -> "cm:" + folder.getName()).collect(Collectors.joining("/")); + String folderPath = testFolders.stream().map(folder -> folder.getName()).collect(Collectors.joining("/")); SearchRequest query = req("PATH:\"/company_home/sites/" + testSite.getId() + "/documentLibrary/" + folderPath + "/" + testFileName + "\" AND name:*"); searchQueryService.expectResultsFromQuery(query, testUser, testFileName); } @@ -162,8 +158,7 @@ public void testPathNameIntersect() searchQueryService.expectResultsFromQuery(query, testUser, testFileName); } - @Test(groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test(groups = TestGroup.SEARCH) public void testAllDescendentsOfFolder() { SearchRequest query = req("PATH:\"//" + testFolders.get(0).getName() + "//*\" AND name:*"); @@ -203,8 +198,7 @@ public void testParent() searchQueryService.expectResultsFromQuery(query, testUser, testFolders.get(2).getName()); } - @Test(groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test(groups = TestGroup.SEARCH) public void testAllFoldersInSite() { SearchRequest query = req("PATH:\"/*/sites/" + testSite.getId() + "/*//*\" AND TYPE:\"cm:folder\" AND name:*"); diff --git a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java index 72f34b637b..75017d3984 100644 --- a/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java +++ b/tests/tas-elasticsearch/src/test/java/org/alfresco/elasticsearch/reindexing/ElasticsearchReindexingTests.java @@ -21,7 +21,6 @@ import org.alfresco.utility.model.TestGroup; import org.alfresco.utility.network.ServerHealth; import org.apache.http.HttpHost; -import org.junit.Ignore; import org.opensearch.client.RequestOptions; import org.opensearch.client.RestClient; import org.opensearch.client.RestHighLevelClient; @@ -257,8 +256,7 @@ public void testRecreateIndexWithNoMetadataAndPath() "cm:name:'' AND cm:name:*", false); } - @Test (groups = TestGroup.SEARCH, enabled = false) - @Ignore("Until ACS-5798 is done") + @Test (groups = TestGroup.SEARCH) public void testPathReindex() { // GIVEN