mirror of
https://github.com/Alfresco/SearchServices.git
synced 2026-09-16 18:12:56 +00:00
REPO-3294: 6.0: Module Compatibility Tests
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
package org.alfresco.rest.discovery;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
import static org.testng.Assert.assertTrue;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import org.alfresco.rest.RestTest;
|
||||
import org.alfresco.rest.core.RestResponse;
|
||||
import org.alfresco.rest.model.RestDiscoveryModel;
|
||||
@@ -47,4 +53,30 @@ public class DiscoveryTests extends RestTest
|
||||
response.getRepository().getEdition().equals(edition);
|
||||
response.getRepository().getStatus().assertThat().field("isReadOnly").is(false);
|
||||
}
|
||||
|
||||
@Test(groups = { TestGroup.REST_API, TestGroup.DISCOVERY, TestGroup.ALL_AMPS, TestGroup.SANITY })
|
||||
@TestRail(section = { TestGroup.REST_API, TestGroup.DISCOVERY }, executionType = ExecutionType.SANITY,
|
||||
description = "Sanity tests for GET /discovery endpoint")
|
||||
public void getRepositoryInstalledModules() throws Exception
|
||||
{
|
||||
// Get repository info using Discovery API
|
||||
restClient.authenticateUser(userModel).withDiscoveryAPI().getRepositoryInfo();
|
||||
restClient.assertStatusCodeIs(HttpStatus.OK);
|
||||
|
||||
// Check that all modules are present
|
||||
List<String> 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("org_alfresco_integrations_S3Connector"));
|
||||
assertTrue(modules.contains("org_alfresco_module_xamconnector"));
|
||||
assertTrue(modules.contains("org.alfresco.module.KofaxAddon"));
|
||||
assertTrue(modules.contains("alfresco-content-connector-for-salesforce-repo"));
|
||||
assertTrue(modules.contains("alfresco-share-services"));
|
||||
assertTrue(modules.contains("alfresco-saml-repo"));
|
||||
assertTrue(modules.contains("org_alfresco_device_sync_repo"));
|
||||
|
||||
// Check that all installed modules are in INSTALLED state
|
||||
List<String> modulesStates = restClient.onResponse().getResponse().jsonPath().getList("entry.repository.modules.installState", String.class);
|
||||
assertEquals(Collections.frequency(modulesStates, "INSTALLED"), 9);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user