From b5397288a94360605431955e6ebb5bc994fbffa3 Mon Sep 17 00:00:00 2001 From: cturlica Date: Wed, 20 Jan 2021 17:50:02 +0200 Subject: [PATCH 01/24] REPO-5439: Re-enable changes disabled in ACS-936 - update tas version --- rm-automation/rm-automation-community-rest-api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index f178cc8d3b..4a23e34cbe 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -15,7 +15,7 @@ false alfresco-governance-services-community-share alfresco-governance-services-community-repo - 1.38 + 1.51 2.0.0 2.7.9.1 From 8107e82e0fba96dec3712ee6e0a5e5011456d088 Mon Sep 17 00:00:00 2001 From: cturlica Date: Wed, 27 Jan 2021 10:47:09 +0200 Subject: [PATCH 02/24] REPO-5439: Re-enable changes disabled in ACS-936 - refactor test framework - added cluster tests --- .../rm-automation-community-rest-api/pom.xml | 2 +- travis/.travis.tests-stage.yml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/rm-automation/rm-automation-community-rest-api/pom.xml b/rm-automation/rm-automation-community-rest-api/pom.xml index 202a565fe6..b559c7682d 100644 --- a/rm-automation/rm-automation-community-rest-api/pom.xml +++ b/rm-automation/rm-automation-community-rest-api/pom.xml @@ -15,7 +15,7 @@ false alfresco-governance-services-community-share alfresco-governance-services-community-repo - 1.50 + 1.51 3.0.41 2.0.0 2.7.9.1 diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index af9ff3931f..693954d4a4 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -40,6 +40,17 @@ jobs: - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports + - name: "Enterprise Rest API Cluster Tests" + stage: Tests + install: + - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am + - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am + before_script: + - bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-cluster.yml" + - bash scripts/waitForAlfrescoToStart.sh + script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false + after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 + - name: "Enterprise Rest API WORM Tests" stage: Tests install: From bc41cf84577259a2a7e0a44c6a729a826e46fa6d Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 27 Jan 2021 10:45:03 +0000 Subject: [PATCH 03/24] APPS-723 security marks cluster tests --- travis/.travis.tests-stage.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index 693954d4a4..d861c5ed2a 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -43,10 +43,10 @@ jobs: - name: "Enterprise Rest API Cluster Tests" stage: Tests install: - - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am + - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am before_script: - - bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-cluster.yml" + - bash scripts/start-compose.sh "${$ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml" - bash scripts/waitForAlfrescoToStart.sh script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 From f195dad8d25be85366458e58e89f2e7697309d25 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 27 Jan 2021 12:40:20 +0000 Subject: [PATCH 04/24] fix path --- travis/.travis.tests-stage.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index d861c5ed2a..90fcd13015 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -46,7 +46,7 @@ jobs: - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am before_script: - - bash scripts/start-compose.sh "${$ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml" + - bash scripts/start-compose.sh "${ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml" - bash scripts/waitForAlfrescoToStart.sh script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 From bf3a37525c66f0a3b83eefb6a59f6db79334179b Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 27 Jan 2021 15:46:51 +0000 Subject: [PATCH 05/24] added tests for APPs-753 --- .../org/alfresco/rest/rm/community/base/BaseRMRestTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java index 1b57359633..013de0ad71 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java @@ -48,6 +48,7 @@ import static org.alfresco.rest.rm.community.utils.FilePlanComponentsUtil.create import static org.alfresco.rest.rm.community.utils.RMSiteUtil.createStandardRMSiteModel; import static org.alfresco.utility.data.RandomData.getRandomAlphanumeric; import static org.springframework.http.HttpStatus.CREATED; +import static org.springframework.http.HttpStatus.NO_CONTENT; import static org.springframework.http.HttpStatus.OK; import static org.testng.Assert.assertFalse; import static org.testng.Assert.assertTrue; @@ -194,6 +195,7 @@ public class BaseRMRestTest extends RestTest if (rmSiteAPI.existsRMSite()) { rmSiteAPI.deleteRMSite(); + assertStatusCode(NO_CONTENT); } rmSiteAPI.createRMSite(rmSiteModel); From 524f1221f842056171a5b7901136a4bf426d7812 Mon Sep 17 00:00:00 2001 From: cturlica Date: Fri, 29 Jan 2021 00:00:25 +0200 Subject: [PATCH 06/24] REPO-5439: Re-enable changes disabled in ACS-936 - updated versions - removed commented lines --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 39e983a28c..c99eb1ed03 100644 --- a/pom.xml +++ b/pom.xml @@ -597,7 +597,7 @@ 4.0.1 1.19 - 8.346 + 8.378 From 5b25f18875927e9ae9d04078575019222fe213d3 Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Mon, 1 Feb 2021 09:58:48 +0200 Subject: [PATCH 07/24] commented out the test with https://alfresco.atlassian.net/browse/APPS-764 --- .../service/DispositionServiceImplTest.java | 232 +++++++++--------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java index 96922c1352..c1cc9258b1 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java @@ -912,121 +912,121 @@ public class DispositionServiceImplTest extends BaseRMTestCase private NodeRef testRM386RecordCategory; private DispositionSchedule testRM386DispositionSchedule; private NodeRef testRM386Record; - - /** - * Test to make sure all the search rollups are correct after schedule is updated - * @throws Exception - */ - public void testRM386() throws Exception - { - doTestInTransaction(new Test() - { - @Override - public Void run() throws Exception - { - testRM386RecordCategory = filePlanService.createRecordCategory(rmContainer, "RM386"); - testRM386DispositionSchedule = utils.createBasicDispositionSchedule( - testRM386RecordCategory, - "disposition instructions", - "disposition authority", - true, // record level - true); // set the default actions - - NodeRef recordFolder = recordFolderService.createRecordFolder(testRM386RecordCategory, "testRM386RecordFolder"); - testRM386Record = utils.createRecord(recordFolder, "testRM386Record", "testRM386Record"); - - return null; - } - - @SuppressWarnings("unchecked") - @Override - public void test(Void result) throws Exception - { - // Test the rollups for the record - Map properties = nodeService.getProperties(testRM386Record); - - assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); - assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); - assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); - - assertEquals("none", properties.get(PROP_RS_DISPOSITION_PERIOD)); - assertEquals("0", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); - - List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); - assertNotNull(events); - assertEquals(1, events.size()); - assertEquals(CommonRMTestUtils.DEFAULT_EVENT_NAME, events.get(0)); - assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); - - assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); - assertNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); - } - }); - - doTestInTransaction(new Test() - { - @Override - public DispositionActionDefinition run() throws Exception - { - DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); - assertNotNull(actionDefinition); - - Map adParams = new HashMap<>(3); - - List events = new ArrayList<>(1); - events.add(CommonRMTestUtils.DEFAULT_EVENT_NAME); - events.add("obsolete"); - adParams.put(PROP_DISPOSITION_EVENT, (Serializable)events); - adParams.put(PROP_DISPOSITION_PERIOD, "week|1"); - - dispositionService.updateDispositionActionDefinition( - actionDefinition, - adParams); - - return actionDefinition; - } - - @SuppressWarnings("unchecked") - @Override - public void test(DispositionActionDefinition result) throws Exception - { - DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); - assertNotNull(actionDefinition); - assertTrue(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); - - // Publish the updates - PublishUpdatesJobExecuter updater = (PublishUpdatesJobExecuter)applicationContext.getBean("publishUpdatesJobExecuter"); - updater.executeImpl(); - - assertFalse(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); - - // Check the record has been updated - DispositionAction dispositionAction = dispositionService.getNextDispositionAction(testRM386Record); - assertNotNull(dispositionAction); - assertEquals("cutoff", dispositionAction.getName()); - assertNotNull(dispositionAction.getAsOfDate()); - assertEquals(2, dispositionAction.getEventCompletionDetails().size()); - - // Test the rollups for the record - Map properties = nodeService.getProperties(testRM386Record); - - assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); - assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); - assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); - - assertEquals("week", properties.get(PROP_RS_DISPOSITION_PERIOD)); - assertEquals("1", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); - - List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); - assertNotNull(events); - assertEquals(2, events.size()); - assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); - - assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); - assertNotNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); - } - }); - - } +// This test was commented out with the task https://alfresco.atlassian.net/browse/APPS-764 +// /** +// * Test to make sure all the search rollups are correct after schedule is updated +// * @throws Exception +// */ +// public void testRM386() throws Exception +// { +// doTestInTransaction(new Test() +// { +// @Override +// public Void run() throws Exception +// { +// testRM386RecordCategory = filePlanService.createRecordCategory(rmContainer, "RM386"); +// testRM386DispositionSchedule = utils.createBasicDispositionSchedule( +// testRM386RecordCategory, +// "disposition instructions", +// "disposition authority", +// true, // record level +// true); // set the default actions +// +// NodeRef recordFolder = recordFolderService.createRecordFolder(testRM386RecordCategory, "testRM386RecordFolder"); +// testRM386Record = utils.createRecord(recordFolder, "testRM386Record", "testRM386Record"); +// +// return null; +// } +// +// @SuppressWarnings("unchecked") +// @Override +// public void test(Void result) throws Exception +// { +// // Test the rollups for the record +// Map properties = nodeService.getProperties(testRM386Record); +// +// assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); +// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); +// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); +// +// assertEquals("none", properties.get(PROP_RS_DISPOSITION_PERIOD)); +// assertEquals("0", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); +// +// List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); +// assertNotNull(events); +// assertEquals(1, events.size()); +// assertEquals(CommonRMTestUtils.DEFAULT_EVENT_NAME, events.get(0)); +// assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); +// +// assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); +// assertNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); +// } +// }); +// +// doTestInTransaction(new Test() +// { +// @Override +// public DispositionActionDefinition run() throws Exception +// { +// DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); +// assertNotNull( "Expected an action definition", actionDefinition); +// +// Map adParams = new HashMap<>(3); +// +// List events = new ArrayList<>(1); +// events.add(CommonRMTestUtils.DEFAULT_EVENT_NAME); +// events.add("obsolete"); +// adParams.put(PROP_DISPOSITION_EVENT, (Serializable)events); +// adParams.put(PROP_DISPOSITION_PERIOD, "week|1"); +// +// dispositionService.updateDispositionActionDefinition( +// actionDefinition, +// adParams); +// +// return actionDefinition; +// } +// +// @SuppressWarnings("unchecked") +// @Override +// public void test(DispositionActionDefinition result) throws Exception +// { +// DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); +// assertNotNull(actionDefinition); +// assertTrue(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); +// +// // Publish the updates +// PublishUpdatesJobExecuter updater = (PublishUpdatesJobExecuter)applicationContext.getBean("publishUpdatesJobExecuter"); +// updater.executeImpl(); +// +// assertFalse(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); +// +// // Check the record has been updated +// DispositionAction dispositionAction = dispositionService.getNextDispositionAction(testRM386Record); +// assertNotNull(dispositionAction); +// assertEquals("cutoff", dispositionAction.getName()); +// assertNotNull(dispositionAction.getAsOfDate()); +// assertEquals(2, dispositionAction.getEventCompletionDetails().size()); +// +// // Test the rollups for the record +// Map properties = nodeService.getProperties(testRM386Record); +// +// assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); +// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); +// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); +// +// assertEquals("week", properties.get(PROP_RS_DISPOSITION_PERIOD)); +// assertEquals("1", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); +// +// List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); +// assertNotNull(events); +// assertEquals(2, events.size()); +// assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); +// +// assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); +// assertNotNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); +// } +// }); +// +// } } From 2d2e6302492c56d5f0ed53d58f2a4ebf3ac7dbde Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Wed, 3 Feb 2021 08:28:14 +0200 Subject: [PATCH 08/24] update the cluster test ng suite display the logs from the second node in travis --- travis/.travis.tests-stage.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index 90fcd13015..340f60bab2 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -49,7 +49,14 @@ jobs: - bash scripts/start-compose.sh "${ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml" - bash scripts/waitForAlfrescoToStart.sh script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false - after_failure: docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 + addons: + artifacts: + paths: + - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log + - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports + after_failure: + - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 + - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 - name: "Enterprise Rest API WORM Tests" stage: Tests From aa2080773824758c30a656c9c14a59c10400b893 Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Wed, 3 Feb 2021 10:25:22 +0200 Subject: [PATCH 09/24] displayed the logs after running the tests (debugging purpose) --- travis/.travis.tests-stage.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index 340f60bab2..6932a97377 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -54,6 +54,9 @@ jobs: paths: - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports + after_script: + - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 + - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 after_failure: - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 From 14ec5add46ec32f54c71f582afb31da36dd8cdcc Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Wed, 3 Feb 2021 12:30:34 +0200 Subject: [PATCH 10/24] add a new test for cluster/SecurityClassificationClusterTests.java debug no output --- scripts/waitForAlfrescoToStart.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/waitForAlfrescoToStart.sh b/scripts/waitForAlfrescoToStart.sh index 065ae39544..4e378948d1 100755 --- a/scripts/waitForAlfrescoToStart.sh +++ b/scripts/waitForAlfrescoToStart.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash - +set -xe WAIT_INTERVAL=1 COUNTER=0 TIMEOUT=300 From 4b2d862b5a6eef0cd6d1089c4c9ac7514254b0ee Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Wed, 3 Feb 2021 18:23:20 +0200 Subject: [PATCH 11/24] remove duplication from travis --- travis/.travis.tests-stage.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index 6932a97377..340f60bab2 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -54,9 +54,6 @@ jobs: paths: - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports - after_script: - - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 after_failure: - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 From 0a9447074c9187d53179d79bc735703cd193cd2b Mon Sep 17 00:00:00 2001 From: cturlica Date: Mon, 15 Feb 2021 17:45:37 +0200 Subject: [PATCH 12/24] REPO-5439: Re-enable changes disabled in ACS-936 - reverted SecurityMarksDAOImpl changes - updated community and ent repo --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 340a50d162..66decd375d 100644 --- a/pom.xml +++ b/pom.xml @@ -597,7 +597,7 @@ 4.0.1 1.19 - 8.382 + repo-5439v2-c1 From b06bfa42957a604d5a238ecd4319afc288fe7dea Mon Sep 17 00:00:00 2001 From: cturlica Date: Tue, 16 Feb 2021 17:18:17 +0200 Subject: [PATCH 13/24] REPO-5439: Re-enable changes disabled in ACS-936 - fixed lib updates --- pom.xml | 47 +++++++++++++++++++++++++++++++---------------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 66decd375d..039e3849c9 100644 --- a/pom.xml +++ b/pom.xml @@ -592,8 +592,9 @@ latest quay.io - 2.4.0-b180830.0359 - 3.0.0-M4 + + + 2.3.3 4.0.1 1.19 @@ -602,11 +603,11 @@ - - com.google.guava - guava - 18.0 - + + + + + org.mockito mockito-all @@ -639,21 +640,35 @@ test - - javax.xml.bind - jaxb-api - ${javax-jaxb.version} - provided - + + + + + + org.apache.camel camel-mock ${camel.mock.version} + + + + + + + + - com.sun.xml.bind - jaxb-impl - ${javax-jaxb-impl.version} + jakarta.xml.bind + jakarta.xml.bind-api + ${jakarta-xml-bind.version} + provided + + + org.glassfish.jaxb + jaxb-runtime + ${jakarta-xml-bind.version} provided From 4b1ebc0171ca737a6be59168733b86b779c2a503 Mon Sep 17 00:00:00 2001 From: cturlica Date: Tue, 16 Feb 2021 19:15:59 +0200 Subject: [PATCH 14/24] REPO-5439: Re-enable changes disabled in ACS-936 - fixed tests --- .../extended-repository-context.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml index 482af53384..89be1595ac 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml @@ -270,4 +270,19 @@ + + + + + + + + + + + + + + + From 0314754850862a4ef79546a0e7714f05deaf82d0 Mon Sep 17 00:00:00 2001 From: cturlica Date: Wed, 17 Feb 2021 10:04:34 +0200 Subject: [PATCH 15/24] REPO-5439: Re-enable changes disabled in ACS-936 - update repo versions --- pom.xml | 6 +++--- .../extended-repository-context.xml | 16 ---------------- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 039e3849c9..cb58ee6f43 100644 --- a/pom.xml +++ b/pom.xml @@ -598,13 +598,13 @@ 4.0.1 1.19 - repo-5439v2-c1 + repo-5439v2-c2 - - +rest-context.xmlrest-context.xml + diff --git a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml index 89be1595ac..ff74ae7b86 100644 --- a/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml +++ b/rm-community/rm-community-repo/config/alfresco/module/org_alfresco_module_rm/extended-repository-context.xml @@ -269,20 +269,4 @@ true - - - - - - - - - - - - - - - - From 4888242092981099f2155c4d1d3be274e79472c3 Mon Sep 17 00:00:00 2001 From: cturlica Date: Wed, 17 Feb 2021 10:19:01 +0200 Subject: [PATCH 16/24] REPO-5439: Re-enable changes disabled in ACS-936 - fix pom --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index cb58ee6f43..4b99188883 100644 --- a/pom.xml +++ b/pom.xml @@ -603,7 +603,7 @@ -rest-context.xmlrest-context.xml + From 530abb15e28825da96cca40dd128280215cd6938 Mon Sep 17 00:00:00 2001 From: cturlica Date: Wed, 17 Feb 2021 14:06:20 +0200 Subject: [PATCH 17/24] REPO-5439: Re-enable changes disabled in ACS-936 - update libs --- pom.xml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/pom.xml b/pom.xml index 4b99188883..27cac6c29a 100644 --- a/pom.xml +++ b/pom.xml @@ -629,6 +629,26 @@ mysql-connector-java ${mysql.version} + + org.alfresco + alfresco-core + ${alfresco-community-repo.version} + + + org.alfresco + alfresco-data-model + ${alfresco-community-repo.version} + + + org.alfresco + alfresco-repository + ${alfresco-community-repo.version} + + + org.alfresco + alfresco-remote-api + ${alfresco-community-repo.version} + From 26a3872700326aa3916cfc989205f7386d6031b7 Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Wed, 17 Feb 2021 14:19:33 +0200 Subject: [PATCH 18/24] additional logging for the case when creating security group might fail without having a know reasonexpe --- .../src/main/java/org/alfresco/rest/core/v0/BaseAPI.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java index 366e4a245a..95b05be349 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/v0/BaseAPI.java @@ -77,6 +77,7 @@ public abstract class BaseAPI /** exception key in JSON response body */ private static final String EXCEPTION_KEY = "exception"; + private static final String MESSAGE_KEY = "message"; public static final String NODE_PREFIX = "workspace/SpacesStore/"; protected static final String UPDATE_METADATA_API = "{0}node/{1}/formprocessor"; protected static final String ACTIONS_API = "{0}actionQueue"; @@ -582,6 +583,12 @@ public abstract class BaseAPI break; case HttpStatus.SC_INTERNAL_SERVER_ERROR: + if (responseBody != null && responseBody.has(EXCEPTION_KEY)) + { + LOGGER.error("Request failed with error message: {}", responseBody.getString(MESSAGE_KEY)); + returnValues = responseBody; + } + break; case HttpStatus.SC_BAD_REQUEST: case HttpStatus.SC_UNPROCESSABLE_ENTITY: if (responseBody != null && responseBody.has(EXCEPTION_KEY)) From 476e9c55a0896a1e9a4f522da63147fed13cab69 Mon Sep 17 00:00:00 2001 From: cturlica Date: Fri, 19 Feb 2021 19:48:58 +0200 Subject: [PATCH 19/24] REPO-5439: Re-enable changes disabled in ACS-936 - cleanup - updated with acs released versions --- pom.xml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index 27cac6c29a..504f9fee94 100644 --- a/pom.xml +++ b/pom.xml @@ -592,22 +592,15 @@ latest quay.io - - 2.3.3 4.0.1 1.19 - repo-5439v2-c2 + 8.400 - - - - - org.mockito mockito-all @@ -659,24 +652,11 @@ 4.12 test - - - - - - - org.apache.camel camel-mock ${camel.mock.version} - - - - - - From 0f416b0e5ad71c95a1b26429c502ab7364daa747 Mon Sep 17 00:00:00 2001 From: cturlica Date: Tue, 23 Feb 2021 10:58:53 +0200 Subject: [PATCH 20/24] REPO-5439: Re-enable changes disabled in ACS-936 - fixed typo - reverted lib changes --- pom.xml | 49 ++++++++++++++++++------------------------------- 1 file changed, 18 insertions(+), 31 deletions(-) diff --git a/pom.xml b/pom.xml index b046d59d38..62a6270382 100644 --- a/pom.xml +++ b/pom.xml @@ -592,7 +592,8 @@ latest quay.io - 2.3.3 + 2.4.0-b180830.0359 + 3.0.0-M4 4.0.1 1.19 @@ -601,6 +602,11 @@ + + com.google.guava + guava + 18.0 + org.mockito mockito-all @@ -622,26 +628,6 @@ mysql-connector-java ${mysql.version} - - org.alfresco - alfresco-core - ${alfresco-community-repo.version} - - - org.alfresco - alfresco-data-model - ${alfresco-community-repo.version} - - - org.alfresco - alfresco-repository - ${alfresco-community-repo.version} - - - org.alfresco - alfresco-remote-api - ${alfresco-community-repo.version} - @@ -652,23 +638,24 @@ 4.12 test + + + javax.xml.bind + jaxb-api + ${javax-jaxb.version} + provided + + org.apache.camel camel-mock ${camel.mock.version} - - jakarta.xml.bind - jakarta.xml.bind-api - ${jakarta-xml-bind.version} - provided - - - org.glassfish.jaxb - jaxb-runtime - ${jakarta-xml-bind.version} + com.sun.xml.bind + jaxb-impl + ${javax-jaxb-impl.version} provided From 91403ea3ffa4c53dcb07d40bfaea3c6009edba5f Mon Sep 17 00:00:00 2001 From: rodicasutu Date: Tue, 23 Feb 2021 11:23:11 +0200 Subject: [PATCH 21/24] fix the review comment fix the path for artefacts for cluster tests --- travis/.travis.tests-stage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index 2a3fcb7423..a11568b363 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -72,6 +72,7 @@ jobs: paths: - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports + target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER after_failure: - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 From 399ca36a52d32d8b05a060c22d1c4497e8eeceea Mon Sep 17 00:00:00 2001 From: cturlica Date: Tue, 23 Feb 2021 12:05:02 +0200 Subject: [PATCH 22/24] REPO-5439: Re-enable changes disabled in ACS-936 - enable commented test --- .../service/DispositionServiceImplTest.java | 232 +++++++++--------- 1 file changed, 116 insertions(+), 116 deletions(-) diff --git a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java index c1cc9258b1..0265521c11 100644 --- a/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java +++ b/rm-community/rm-community-repo/test/java/org/alfresco/module/org_alfresco_module_rm/test/legacy/service/DispositionServiceImplTest.java @@ -912,121 +912,121 @@ public class DispositionServiceImplTest extends BaseRMTestCase private NodeRef testRM386RecordCategory; private DispositionSchedule testRM386DispositionSchedule; private NodeRef testRM386Record; -// This test was commented out with the task https://alfresco.atlassian.net/browse/APPS-764 -// /** -// * Test to make sure all the search rollups are correct after schedule is updated -// * @throws Exception -// */ -// public void testRM386() throws Exception -// { -// doTestInTransaction(new Test() -// { -// @Override -// public Void run() throws Exception -// { -// testRM386RecordCategory = filePlanService.createRecordCategory(rmContainer, "RM386"); -// testRM386DispositionSchedule = utils.createBasicDispositionSchedule( -// testRM386RecordCategory, -// "disposition instructions", -// "disposition authority", -// true, // record level -// true); // set the default actions -// -// NodeRef recordFolder = recordFolderService.createRecordFolder(testRM386RecordCategory, "testRM386RecordFolder"); -// testRM386Record = utils.createRecord(recordFolder, "testRM386Record", "testRM386Record"); -// -// return null; -// } -// -// @SuppressWarnings("unchecked") -// @Override -// public void test(Void result) throws Exception -// { -// // Test the rollups for the record -// Map properties = nodeService.getProperties(testRM386Record); -// -// assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); -// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); -// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); -// -// assertEquals("none", properties.get(PROP_RS_DISPOSITION_PERIOD)); -// assertEquals("0", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); -// -// List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); -// assertNotNull(events); -// assertEquals(1, events.size()); -// assertEquals(CommonRMTestUtils.DEFAULT_EVENT_NAME, events.get(0)); -// assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); -// -// assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); -// assertNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); -// } -// }); -// -// doTestInTransaction(new Test() -// { -// @Override -// public DispositionActionDefinition run() throws Exception -// { -// DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); -// assertNotNull( "Expected an action definition", actionDefinition); -// -// Map adParams = new HashMap<>(3); -// -// List events = new ArrayList<>(1); -// events.add(CommonRMTestUtils.DEFAULT_EVENT_NAME); -// events.add("obsolete"); -// adParams.put(PROP_DISPOSITION_EVENT, (Serializable)events); -// adParams.put(PROP_DISPOSITION_PERIOD, "week|1"); -// -// dispositionService.updateDispositionActionDefinition( -// actionDefinition, -// adParams); -// -// return actionDefinition; -// } -// -// @SuppressWarnings("unchecked") -// @Override -// public void test(DispositionActionDefinition result) throws Exception -// { -// DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); -// assertNotNull(actionDefinition); -// assertTrue(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); -// -// // Publish the updates -// PublishUpdatesJobExecuter updater = (PublishUpdatesJobExecuter)applicationContext.getBean("publishUpdatesJobExecuter"); -// updater.executeImpl(); -// -// assertFalse(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); -// -// // Check the record has been updated -// DispositionAction dispositionAction = dispositionService.getNextDispositionAction(testRM386Record); -// assertNotNull(dispositionAction); -// assertEquals("cutoff", dispositionAction.getName()); -// assertNotNull(dispositionAction.getAsOfDate()); -// assertEquals(2, dispositionAction.getEventCompletionDetails().size()); -// -// // Test the rollups for the record -// Map properties = nodeService.getProperties(testRM386Record); -// -// assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); -// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); -// assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); -// -// assertEquals("week", properties.get(PROP_RS_DISPOSITION_PERIOD)); -// assertEquals("1", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); -// -// List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); -// assertNotNull(events); -// assertEquals(2, events.size()); -// assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); -// -// assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); -// assertNotNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); -// } -// }); -// -// } + + /** + * Test to make sure all the search rollups are correct after schedule is updated + * @throws Exception + */ + public void testRM386() throws Exception + { + doTestInTransaction(new Test() + { + @Override + public Void run() throws Exception + { + testRM386RecordCategory = filePlanService.createRecordCategory(rmContainer, "RM386"); + testRM386DispositionSchedule = utils.createBasicDispositionSchedule( + testRM386RecordCategory, + "disposition instructions", + "disposition authority", + true, // record level + true); // set the default actions + + NodeRef recordFolder = recordFolderService.createRecordFolder(testRM386RecordCategory, "testRM386RecordFolder"); + testRM386Record = utils.createRecord(recordFolder, "testRM386Record", "testRM386Record"); + + return null; + } + + @SuppressWarnings("unchecked") + @Override + public void test(Void result) throws Exception + { + // Test the rollups for the record + Map properties = nodeService.getProperties(testRM386Record); + + assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); + assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); + assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); + + assertEquals("none", properties.get(PROP_RS_DISPOSITION_PERIOD)); + assertEquals("0", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); + + List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); + assertNotNull(events); + assertEquals(1, events.size()); + assertEquals(CommonRMTestUtils.DEFAULT_EVENT_NAME, events.get(0)); + assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); + + assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); + assertNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); + } + }); + + doTestInTransaction(new Test() + { + @Override + public DispositionActionDefinition run() throws Exception + { + DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); + assertNotNull( "Expected an action definition", actionDefinition); + + Map adParams = new HashMap<>(3); + + List events = new ArrayList<>(1); + events.add(CommonRMTestUtils.DEFAULT_EVENT_NAME); + events.add("obsolete"); + adParams.put(PROP_DISPOSITION_EVENT, (Serializable)events); + adParams.put(PROP_DISPOSITION_PERIOD, "week|1"); + + dispositionService.updateDispositionActionDefinition( + actionDefinition, + adParams); + + return actionDefinition; + } + + @SuppressWarnings("unchecked") + @Override + public void test(DispositionActionDefinition result) throws Exception + { + DispositionActionDefinition actionDefinition = testRM386DispositionSchedule.getDispositionActionDefinitionByName("cutoff"); + assertNotNull(actionDefinition); + assertTrue(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); + + // Publish the updates + PublishUpdatesJobExecuter updater = (PublishUpdatesJobExecuter)applicationContext.getBean("publishUpdatesJobExecuter"); + updater.executeImpl(); + + assertFalse(nodeService.hasAspect(actionDefinition.getNodeRef(), ASPECT_UNPUBLISHED_UPDATE)); + + // Check the record has been updated + DispositionAction dispositionAction = dispositionService.getNextDispositionAction(testRM386Record); + assertNotNull(dispositionAction); + assertEquals("cutoff", dispositionAction.getName()); + assertNotNull(dispositionAction.getAsOfDate()); + assertEquals(2, dispositionAction.getEventCompletionDetails().size()); + + // Test the rollups for the record + Map properties = nodeService.getProperties(testRM386Record); + + assertEquals(Boolean.TRUE, properties.get(PROP_RS_HAS_DISPOITION_SCHEDULE)); + assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_AUTHORITY, properties.get(PROP_RS_DISPOITION_AUTHORITY)); + assertEquals(CommonRMTestUtils.DEFAULT_DISPOSITION_INSTRUCTIONS, properties.get(PROP_RS_DISPOITION_INSTRUCTIONS)); + + assertEquals("week", properties.get(PROP_RS_DISPOSITION_PERIOD)); + assertEquals("1", properties.get(PROP_RS_DISPOSITION_PERIOD_EXPRESSION)); + + List events = (List)properties.get(PROP_RS_DISPOSITION_EVENTS); + assertNotNull(events); + assertEquals(2, events.size()); + assertEquals(Boolean.FALSE, properties.get(PROP_RS_DISPOSITION_EVENTS_ELIGIBLE)); + + assertEquals("cutoff", properties.get(PROP_RS_DISPOSITION_ACTION_NAME)); + assertNotNull(properties.get(PROP_RS_DISPOSITION_ACTION_AS_OF)); + } + }); + + } } From 1d58290efb6370091795d59d3df34017230fe3d6 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Tue, 23 Feb 2021 13:01:20 +0200 Subject: [PATCH 23/24] rearranged jobs --- travis/.travis.tests-stage.yml | 27 ++++++++++++--------------- 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index a11568b363..fce5ce6aba 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -58,6 +58,18 @@ jobs: - alfresco.log - solr.log target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER + install: + - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am + - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am + before_script: + - bash scripts/create-worm-bucket.sh + - bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-rest.yml" + - bash scripts/waitForAlfrescoToStart.sh + script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false + after_script: + - bash scripts/getLogs.sh + - bash scripts/cleanup.sh + - name: "Enterprise Rest API Cluster Tests" stage: Tests install: @@ -77,21 +89,6 @@ jobs: - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000 - - name: "Enterprise Rest API WORM Tests" - stage: Tests - install: - - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am - - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am - before_script: - - bash scripts/create-worm-bucket.sh - - bash scripts/start-compose.sh "${ENTERPRISE_SHARE_PATH}/docker-compose-worm-support-rest.yml" - - bash scripts/waitForAlfrescoToStart.sh - script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=wormTestSuite.xml -Dskip.automationtests=false - after_script: - - bash scripts/getLogs.sh - - bash scripts/cleanup.sh - - - &community_shared_UI_configuration name: "Community Smoke UI Tests for Records" stage: Tests From fa4c1a980470bc19c72dd6d46cd3485192172732 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Tue, 23 Feb 2021 13:11:48 +0200 Subject: [PATCH 24/24] rearranged addons --- travis/.travis.tests-stage.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index fce5ce6aba..c774080e8d 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -72,6 +72,12 @@ jobs: - name: "Enterprise Rest API Cluster Tests" stage: Tests + addons: + artifacts: + paths: + - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log + - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports + target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER install: - travis_retry travis_wait 90 mvn -B -U -q clean install ${MVN_SKIP} -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-enterprise-rest-api -am @@ -79,12 +85,6 @@ jobs: - bash scripts/start-compose.sh "${ENTERPRISE_REPO_PATH}/docker-compose-cluster.yml" - bash scripts/waitForAlfrescoToStart.sh script: mvn -B test -pl :alfresco-governance-services-automation-enterprise-rest-api -DsuiteXmlFile=clusterTestSuite.xml -Dskip.automationtests=false - addons: - artifacts: - paths: - - ./rm-automation/rm-automation-enterprise-rest-api/target/reports/rm-automation-enterprise-rest-api.log - - ./rm-automation/rm-automation-enterprise-rest-api/target/surefire-reports - target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER after_failure: - docker ps -a | grep '_alfresco_1' | awk '{print $1}' | xargs docker logs | tail -5000 - docker ps -a | grep '_alfresco2_1' | awk '{print $1}' | xargs docker logs | tail -5000