Commit aa093be8 authored by Pramesh Patil's avatar Pramesh Patil
Browse files

updated azure UT for logger changes.

parent 833c2eaa
Pipeline #30819 failed with stages
in 1 minute and 17 seconds
......@@ -9,6 +9,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
import org.opengroup.osdu.azure.util.AzureServicePrincipal;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.wks.exceptions.ApplicationException;
import org.opengroup.osdu.wks.logging.WksLogger;
import org.opengroup.osdu.wks.provider.azure.di.AzureBootstrapConfig;
import java.io.UnsupportedEncodingException;
......@@ -38,6 +39,9 @@ public class JwtTokenGeneratorTest {
@Mock
private AzureBootstrapConfig azureBootstrapConfig;
@Mock
private WksLogger logger;
@BeforeEach
public void init() {
......
......@@ -26,6 +26,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
import org.opengroup.osdu.wks.config.ThreadDpsHeaders;
import org.opengroup.osdu.wks.exceptions.ApplicationException;
import org.opengroup.osdu.wks.exceptions.BadRequestException;
import org.opengroup.osdu.wks.logging.WksLogger;
import org.opengroup.osdu.wks.model.RawRecordDetails;
import org.opengroup.osdu.wks.provider.azure.utils.MDCContextMap;
import org.opengroup.osdu.wks.service.WKSService;
......@@ -62,6 +63,9 @@ public class ProcessWKSTransformTest {
@Mock
private MDCContextMap mdcContextMap;
@Mock
WksLogger logger;
@Spy
private ThreadDpsHeaders dpsHeaders;
......
......@@ -10,6 +10,7 @@ import org.mockito.Mock;
import org.mockito.junit.jupiter.MockitoExtension;
import org.opengroup.osdu.core.common.model.tenant.TenantInfo;
import org.opengroup.osdu.core.common.provider.interfaces.ITenantFactory;
import org.opengroup.osdu.wks.logging.WksLogger;
import org.opengroup.osdu.wks.provider.azure.di.AzureBootstrapConfig;
import java.util.Collections;
......@@ -46,6 +47,9 @@ public class SubscriptionManagerImplTest {
@Mock
private ITenantFactory tenantFactory;
@Mock
private WksLogger logger;
private static final String dataPartition = "testTenant";
......
......@@ -16,6 +16,7 @@ import org.opengroup.osdu.azure.blobstorage.BlobStore;
import org.opengroup.osdu.azure.cosmosdb.CosmosStore;
import org.opengroup.osdu.core.common.model.http.DpsHeaders;
import org.opengroup.osdu.wks.config.RequestIdentity;
import org.opengroup.osdu.wks.logging.WksLogger;
import org.opengroup.osdu.wks.model.mapping.Mapping;
import org.opengroup.osdu.wks.model.mapping.MappingDefinition;
import org.opengroup.osdu.wks.model.mapping.MappingInfo;
......@@ -70,6 +71,9 @@ public class MappingStoreImplTest {
@Mock
private MappingInfo mappingInfoDoc2;
@Mock
private WksLogger logger;
@Captor
private ArgumentCaptor<SqlQuerySpec> sqlQuerySpecArgumentCaptor;
......
......@@ -4,6 +4,8 @@ import org.junit.Test;
import org.junit.Test.None;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.opengroup.osdu.wks.logging.WksLogger;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.google.cloud.pubsub.v1.Subscriber;
......@@ -11,6 +13,8 @@ import com.google.cloud.pubsub.v1.Subscriber;
@RunWith(SpringJUnit4ClassRunner.class)
public class SubscriberListenerTest {
@Mock
WksLogger logger;
@InjectMocks
private SubscriptionListener subscriptionListener;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment