From f1753e86e8f5d1548018191af5da4b9f5490e61b Mon Sep 17 00:00:00 2001 From: Alexandru Epure Date: Tue, 26 Jun 2018 21:28:59 +0300 Subject: [PATCH] REPO-3518 : Check AMPs are included in repository image Add DiscoveryTests#getDefaultRepositoryInstalledModules in order to verify that reference deployment (docker images) contain AOS, Share-services and google-docs AMPs Exclude core testgroup from restapi-acs-all-amps-suite.xml because DiscoveryTests#getDefaultRepositoryInstalledModules conflicts with DiscoveryTests#getRepositoryInstalledModules as they are ment to test different enviroments. --- .../rest/discovery/DiscoveryTests.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java b/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java index 2328c3182..bb87dcec4 100644 --- a/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java +++ b/e2e-test/java/org/alfresco/rest/discovery/DiscoveryTests.java @@ -80,4 +80,24 @@ public class DiscoveryTests extends RestTest List modulesStates = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.installState", String.class); assertEquals(Collections.frequency(modulesStates, "INSTALLED"), 10); } + + @Test(groups = { TestGroup.REST_API, TestGroup.DISCOVERY, TestGroup.SANITY, TestGroup.CORE }) + @TestRail(section = { TestGroup.REST_API, TestGroup.DISCOVERY }, executionType = ExecutionType.SANITY, + description = "Sanity tests for GET /discovery endpoint") + public void getDefaultRepositoryInstalledModules() throws Exception + { + // Get repository info using Discovery API + restClient.authenticateUser(userModel).withDiscoveryAPI().getRepositoryInfo(); + restClient.assertStatusCodeIs(HttpStatus.OK); + + // Check that all modules are present + List modules = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.id", String.class); + assertTrue(modules.contains("alfresco-aos-module")); + assertTrue(modules.contains("org.alfresco.integrations.google.docs")); + assertTrue(modules.contains("alfresco-share-services")); + + // Check that all installed modules are in INSTALLED state + List modulesStates = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.installState", String.class); + assertEquals(Collections.frequency(modulesStates, "INSTALLED"), 3); + } }