Commit 6c1f574c authored by harshit aggarwal's avatar harshit aggarwal
Browse files

Adding serviceprincipal attribute in TenantInfo

parent ffadd2ae
Pipeline #7871 passed with stages
in 4 minutes and 26 seconds
......@@ -21,7 +21,7 @@
<groupId>org.opengroup.osdu</groupId>
<artifactId>core-lib-azure</artifactId>
<packaging>jar</packaging>
<version>0.0.27</version>
<version>0.0.28</version>
<name>core-lib-azure</name>
<properties>
......
......@@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;
import java.util.Arrays;
import java.util.Map;
import java.util.HashMap;
import java.util.Collection;
......@@ -113,6 +114,8 @@ public class TenantFactoryImpl implements ITenantFactory {
ti.setName(tenantName);
ti.setComplianceRuleSet(tenantInfoDoc.getComplianceRuleSet());
ti.setDataPartitionId(tenantName);
ti.setServiceAccount(tenantInfoDoc.getServiceprincipalAppId());
ti.setCrmAccountIds(Arrays.asList(tenantInfoDoc.getGroups()));
this.tenants.put(tenantName, ti);
}
);
......
......@@ -81,6 +81,8 @@ public class TenantFactoryImplTest {
expected.setName(tenantName);
expected.setDataPartitionId(tenantName);
expected.setComplianceRuleSet(complianceRuleSet);
expected.setServiceAccount(serviceprincipalAppId);
expected.setCrmAccountIds(Collections.singletonList("first"));
assertEquals(expected, result);
}
......@@ -106,6 +108,8 @@ public class TenantFactoryImplTest {
tenantInfo.setName(tenantName);
tenantInfo.setDataPartitionId(tenantName);
tenantInfo.setComplianceRuleSet(complianceRuleSet);
tenantInfo.setServiceAccount(serviceprincipalAppId);
tenantInfo.setCrmAccountIds(Collections.singletonList("first"));
List<TenantInfo> expected = Collections.singletonList(tenantInfo);
......
Supports Markdown
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