Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Kelly Domico
OS Core Lib Azure
Commits
6c1f574c
Commit
6c1f574c
authored
Sep 10, 2020
by
harshit aggarwal
Browse files
Adding serviceprincipal attribute in TenantInfo
parent
ffadd2ae
Changes
3
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
6c1f574c
...
...
@@ -21,7 +21,7 @@
<groupId>
org.opengroup.osdu
</groupId>
<artifactId>
core-lib-azure
</artifactId>
<packaging>
jar
</packaging>
<version>
0.0.2
7
</version>
<version>
0.0.2
8
</version>
<name>
core-lib-azure
</name>
<properties>
...
...
src/main/java/org/opengroup/osdu/azure/multitenancy/TenantFactoryImpl.java
View file @
6c1f574c
...
...
@@ -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
);
}
);
...
...
src/test/java/org/opengroup/osdu/azure/multitenancy/TenantFactoryImplTest.java
View file @
6c1f574c
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment