Skip to content
Snippets Groups Projects
Commit 724eeca5 authored by Sviatoslav Nekhaienko's avatar Sviatoslav Nekhaienko
Browse files

Merge branch 'master' of...

Merge branch 'master' of https://community.opengroup.org/osdu/platform/system/indexer-service into add-schema-service-v2
parents f015c7a2 0be30c8f
No related branches found
No related tags found
1 merge request!60Indexer to read from Schema Service as well as Storage Schema
Pipeline #18422 failed
......@@ -21,7 +21,7 @@ variables:
OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST: 'true'
OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE: 20
OSDU_GCP_DATA_GROUP: osdu
OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_URL,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,REDIS_SEARCH_HOST=$REDIS_SEARCH_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,SECURITY_HTTPS_CERTIFICATE_TRUST=$OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST,INDEXER_HOST=$OSDU_GCP_INDEXER_HOST,STORAGE_QUERY_RECORD_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_HOST,STORAGE_SCHEMA_HOST=$OSDU_GCP_STORAGE_SCHEMA_HOST,STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,STORAGE_RECORDS_BATCH_SIZE=$OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE,INDEXER_QUEUE_HOST=$OSDU_GCP_INDEXER_QUEUE_HOST,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,CRS_API=$OSDU_GCP_CRS_API,DATA_GROUP=$OSDU_GCP_DATA_GROUP,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCES,INDEXER_QUE_SERVICE_MAIL=$OSDU_GCP_SERVICE_ACCOUNT --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
OSDU_GCP_ENV_VARS: AUTHORIZE_API=$OSDU_GCP_ENTITLEMENTS_URL,GOOGLE_CLOUD_PROJECT=$OSDU_GCP_PROJECT,REDIS_SEARCH_HOST=$REDIS_SEARCH_HOST,REDIS_GROUP_HOST=$REDIS_GROUP_HOST,SECURITY_HTTPS_CERTIFICATE_TRUST=$OSDU_SECURITY_HTTPS_CERTIFICATE_TRUST,INDEXER_HOST=$OSDU_GCP_INDEXER_HOST,STORAGE_QUERY_RECORD_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_HOST,STORAGE_SCHEMA_HOST=$OSDU_GCP_STORAGE_SCHEMA_HOST,STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST=$OSDU_GCP_STORAGE_QUERY_RECORD_FOR_CONVERSION_HOST,STORAGE_HOSTNAME=$OSDU_GCP_STORAGE_HOSTNAME,STORAGE_RECORDS_BATCH_SIZE=$OSDU_GCP_STORAGE_RECORDS_BATCH_SIZE,INDEXER_QUEUE_HOST=$OSDU_GCP_INDEXER_QUEUE_HOST,LEGALTAG_API=$OSDU_GCP_LEGALTAG_API,CRS_API=$OSDU_GCP_CRS_API,DATA_GROUP=$OSDU_GCP_DATA_GROUP,GOOGLE_AUDIENCES=$GOOGLE_AUDIENCE,INDEXER_QUE_SERVICE_MAIL=$OSDU_GCP_SERVICE_ACCOUNT --vpc-connector=$OSDU_GCP_VPC_CONNECTOR
IBM_BUILD_SUBDIR: provider/indexer-ibm
IBM_INT_TEST_SUBDIR: testing/indexer-test-ibm
......@@ -38,7 +38,7 @@ include:
file: "build/maven.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/fossa.yml"
file: "scanners/fossa-maven.yml"
- project: "osdu/platform/ci-cd-pipelines"
file: "scanners/gitlab-ultimate.yml"
......
......@@ -561,7 +561,6 @@ The following software have components provided under the terms of this license:
- Stax2 API (from http://github.com/FasterXML/stax2-api)
- jersey-ext-bean-validation (from )
- jersey-spring4 (from )
- oro (from )
========================================================================
BSD-3-Clause
......@@ -625,12 +624,6 @@ CC-BY-2.5
The following software have components provided under the terms of this license:
- Checker Qual (from https://checkerframework.org)
========================================================================
CC-BY-3.0
========================================================================
The following software have components provided under the terms of this license:
- FindBugs-jsr305 (from http://findbugs.sourceforge.net/)
========================================================================
......@@ -665,7 +658,6 @@ The following software have components provided under the terms of this license:
- HK2 core module (from )
- HK2 module of HK2 itself (from )
- JavaBeans Activation Framework API jar (from )
- JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp)
- Run Level Service (from )
- ServiceLocator Default Implementation (from git://java.net/hk2~git/hk2-locator)
- Servlet Specification 2.5 API (from )
......@@ -690,6 +682,7 @@ The following software have components provided under the terms of this license:
- Java Architecture For XML Binding (from )
- Java Servlet API (from http://servlet-spec.java.net)
- JavaBeans Activation Framework (from )
- JavaBeans(TM) Activation Framework (from http://java.sun.com/javase/technologies/desktop/javabeans/jaf/index.jsp)
- JavaMail API (from )
- OSGi resource locator (from )
- jersey-ext-bean-validation (from )
......@@ -834,7 +827,6 @@ LGPL-2.1-or-later
========================================================================
The following software have components provided under the terms of this license:
- Java Native Access (from https://github.com/java-native-access/jna)
- Java Native Access Platform (from https://github.com/java-native-access/jna)
- Javassist (from http://www.javassist.org/)
- SnakeYAML (from http://www.snakeyaml.org)
......@@ -944,7 +936,6 @@ The following software have components provided under the terms of this license:
- jersey-core-common (from )
- jersey-core-server (from git://java.net/jersey~code/jersey-server)
- jts-core (from )
- xml-apis (from )
========================================================================
SISSL-1.2
......@@ -1002,8 +993,10 @@ The following software have components provided under the terms of this license:
- Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth)
- Spring Security JWT Library (from http://github.com/spring-projects/spring-security-oauth)
- Spring Web (from https://github.com/spring-projects/spring-framework)
- StAX API (from http://stax.codehaus.org/)
- msal4j (from https://github.com/AzureAD/microsoft-authentication-library-for-java)
- reactive-streams (from http://www.reactive-streams.org/)
- xml-apis (from )
========================================================================
unknown
......
......@@ -68,21 +68,6 @@ spec:
configMapKeyRef:
name: osdu-svc-properties
key: ENV_KEYVAULT
- name: AZURE_CLIENT_ID
valueFrom:
secretKeyRef:
name: active-directory
key: principal-clientid
- name: AZURE_CLIENT_SECRET
valueFrom:
secretKeyRef:
name: active-directory
key: principal-clientpassword
- name: AZURE_TENANT_ID
valueFrom:
secretKeyRef:
name: active-directory
key: tenantid
- name: aad_client_id
valueFrom:
secretKeyRef:
......
......@@ -19,29 +19,30 @@ import org.elasticsearch.client.RestClient;
import org.elasticsearch.client.RestClientBuilder;
import org.elasticsearch.client.RestHighLevelClient;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.logging.JaxRsDpsLog;
import org.opengroup.osdu.core.common.model.http.AppException;
import org.opengroup.osdu.core.common.model.indexer.IElasticSettingService;
import org.opengroup.osdu.core.common.model.search.ClusterSettings;
import org.opengroup.osdu.core.common.model.search.DeploymentEnvironment;
import org.opengroup.osdu.indexer.config.IndexerConfigurationProperties;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.powermock.modules.junit4.PowerMockRunner;
import static org.junit.Assert.assertEquals;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
@Ignore
@RunWith(SpringRunner.class)
@PrepareForTest({RestClientBuilder.class, RestClient.class, RestHighLevelClient.class})
@RunWith(PowerMockRunner.class)
@PrepareForTest({RestClient.class, RestHighLevelClient.class})
public class ElasticClientHandlerTest {
private static final boolean SECURITY_HTTPS_CERTIFICATE_TRUST = false;
@Mock
private IndexerConfigurationProperties configurationProperties;
@Mock
......@@ -62,7 +63,9 @@ public class ElasticClientHandlerTest {
public void setup() {
initMocks(this);
// mockStatic(RestClient.class);
mockStatic(RestClient.class);
elasticClientHandler.setSecurityHttpsCertificateTrust(SECURITY_HTTPS_CERTIFICATE_TRUST);
}
@Test
......@@ -70,7 +73,7 @@ public class ElasticClientHandlerTest {
ClusterSettings clusterSettings = new ClusterSettings("H", 1, "U:P");
when(configurationProperties.getDeploymentEnvironment()).thenReturn(DeploymentEnvironment.CLOUD);
when(elasticSettingService.getElasticClusterInformation()).thenReturn(clusterSettings);
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenReturn(builder);
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenAnswer(invocation -> builder);
when(builder.setRequestConfigCallback(requestConfigBuilder -> requestConfigBuilder.setConnectTimeout(5000).setSocketTimeout(60000))).thenReturn(builder);
when(builder.build()).thenReturn(restClient);
......@@ -84,7 +87,7 @@ public class ElasticClientHandlerTest {
ClusterSettings clusterSettings = new ClusterSettings("H", 1, "U:P");
when(configurationProperties.getDeploymentEnvironment()).thenReturn(DeploymentEnvironment.CLOUD);
when(elasticSettingService.getElasticClusterInformation()).thenReturn(clusterSettings);
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenReturn(builder);
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenAnswer(invocation -> builder);
when(builder.build()).thenReturn(null);
this.elasticClientHandler.createRestClient();
......@@ -94,7 +97,7 @@ public class ElasticClientHandlerTest {
public void failed_createRestClientForSaaS_when_getcluster_info_throws_exception() {
when(configurationProperties.getDeploymentEnvironment()).thenReturn(DeploymentEnvironment.CLOUD);
when(elasticSettingService.getElasticClusterInformation()).thenThrow(new AppException(1, "", ""));
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenReturn(builder);
when(RestClient.builder(new HttpHost("H", 1, "https"))).thenAnswer(invocation -> builder);
this.elasticClientHandler.createRestClient();
}
......
......@@ -7,7 +7,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.16.RELEASE</version>
<version>2.1.18.RELEASE</version>
<relativePath/>
</parent>
......@@ -30,6 +30,7 @@
<elasticsearch.version>6.8.1</elasticsearch.version>
<netty.version>4.1.51.Final</netty.version>
<reactor-netty.version>0.8.20.RELEASE</reactor-netty.version>
<woodstox-core.version>6.2.3</woodstox-core.version>
<!-- <maven.compiler.target>1.8</maven.compiler.target>-->
<!-- <maven.compiler.source>1.8</maven.compiler.source>-->
<!-- <maven.war.plugin>2.6</maven.war.plugin>-->
......@@ -112,6 +113,11 @@
<artifactId>reactor-netty</artifactId>
<version>${reactor-netty.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.woodstox</groupId>
<artifactId>woodstox-core</artifactId>
<version>${woodstox-core.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment