Skip to content

Commit

Permalink
LRQA-56364 Add test to assert assets are replicated to the local clus…
Browse files Browse the repository at this point in the history
…ter after a full reindex
  • Loading branch information
timpak authored and brianchandotcom committed Mar 24, 2020
1 parent b576387 commit 77c13ac
Showing 1 changed file with 66 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,72 @@ definition {
}
}

test AssertReplicationAfterReindex {
property osgi.app.includes = "portal-search-elasticsearch-cross-cluster-replication,portal-search-elasticsearch7";
property osgi.module.configuration.file.names = "com.liferay.portal.bundle.blacklist.internal.BundleBlacklistConfiguration.config";
property osgi.module.configurations = "blacklistBundleSymbolicNames="com.liferay.portal.mobile.device.detection.fiftyonedegrees.api,com.liferay.portal.mobile.device.detection.fiftyonedegrees.enterprise,com.liferay.portal.mobile.device.detection.fiftyonedegrees.enterprise.test.data,com.liferay.portal.mobile.device.detection.fiftyonedegrees,com.liferay.portal.search.elasticsearch6.impl,com.liferay.portal.search.elasticsearch6.spi,com.liferay.portal.search.elasticsearch6.api,com.liferay.portal.search.elasticsearch6.xpack.security.impl,com.liferay.portal.search.elasticsearch6.xpack.monitoring.web,com.liferay.portal.search.tuning.rankings.web"";
property remote.elasticsearch.enabled = "true";
property remote.elasticsearch.ccr.enabled = "true";
property test.name.skip.portal.instance = "Elasticsearch7EE#AssertReplicationAfterReindex";

JSONDocument.addFile(
dmDocumentDescription = "DM Description",
dmDocumentTitle = "Apple1",
groupName = "Guest");

OSGiConfig.deployOSGiConfigs(
OSGiConfigFileName = "com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConfiguration.config",
OSGiConfigs = "operationMode="REMOTE",remoteClusterConnectionId="remote",logExceptionsOnly="true"");

OSGiConfig.deployOSGiConfigs(
OSGiConfigFileName = "com.liferay.portal.search.elasticsearch7.configuration.ElasticsearchConnectionConfiguration-default_ccr.config",
OSGiConfigs = "connectionId="ccr",networkHostAddresses=["http://localhost:9202"]");

AntCommand(
locator1 = "build-test-elasticsearch7.xml",
value1 = "create-follower-indices");

ProductMenu.gotoPortlet(
category = "Configuration",
panel = "Control Panel",
portlet = "System Settings");

SystemSettings.gotoConfiguration(
configurationCategory = "Search",
configurationName = "Cross-Cluster Replication",
configurationScope = "System Scope");

SystemSettings.configureCrossClusterReplication(ccrLocalClusterConnectionID = "ccr");

Navigator.openURL();

SearchPortlets.searchEmbedded(searchTerm = "Apple");

SearchResultPortlet.viewSearchResults(
searchAssetTitle = "Apple1",
searchAssetType = "Document");

ProductMenu.gotoPortlet(
category = "Configuration",
panel = "Control Panel",
portlet = "Search");

SearchAdministration.executeSearchActions(actionsDescription = "Reindex all search indexes.");

JSONDocument.addFile(
dmDocumentDescription = "DM Description",
dmDocumentTitle = "Apple2",
groupName = "Guest");

Navigator.openURL();

SearchPortlets.searchEmbedded(searchTerm = "Apple");

SearchResultPortlet.viewMultipleSearchResults(
resultsList = "Apple1/Document,Apple2/Document",
searchTerm = "Apple");
}

test AssertSimilarResultsDisplayTemplate {
for (var count : list "1,2,3") {
JSONWebcontent.addWebContent(
Expand Down

0 comments on commit 77c13ac

Please sign in to comment.