|
21 | 21 | import static org.apache.polaris.service.context.TestRealmContextResolver.REALM_PROPERTY_KEY; |
22 | 22 | import static org.assertj.core.api.Assertions.assertThat; |
23 | 23 |
|
24 | | -import com.fasterxml.jackson.core.JsonProcessingException; |
25 | | -import com.fasterxml.jackson.core.type.TypeReference; |
26 | 24 | import jakarta.ws.rs.client.Client; |
27 | 25 | import jakarta.ws.rs.client.ClientBuilder; |
28 | 26 | import jakarta.ws.rs.client.Entity; |
@@ -113,9 +111,8 @@ private PolarisPrincipalSecrets fetchAdminSecrets() { |
113 | 111 | PolarisMetaStoreManager metaStoreManager = |
114 | 112 | helper.metaStoreManagerFactory.getOrCreateMetaStoreManager(realmContext); |
115 | 113 | PrincipalEntity principal = metaStoreManager.findRootPrincipal(polarisContext).orElseThrow(); |
116 | | - Map<String, String> propertiesMap = readInternalProperties(principal); |
117 | 114 | return metaStoreManager |
118 | | - .loadPrincipalSecrets(polarisContext, propertiesMap.get("client_id")) |
| 115 | + .loadPrincipalSecrets(polarisContext, principal.getClientId()) |
119 | 116 | .getPrincipalSecrets(); |
120 | 117 | } |
121 | 118 |
|
@@ -213,15 +210,6 @@ public void destroy() { |
213 | 210 | } |
214 | 211 | } |
215 | 212 |
|
216 | | - private Map<String, String> readInternalProperties(PrincipalEntity principal) { |
217 | | - try { |
218 | | - return helper.objectMapper.readValue( |
219 | | - principal.getInternalProperties(), new TypeReference<>() {}); |
220 | | - } catch (JsonProcessingException e) { |
221 | | - throw new RuntimeException(e); |
222 | | - } |
223 | | - } |
224 | | - |
225 | 213 | private static SnowmanIdentifier getSnowmanIdentifier(TestEnvironment testEnv) { |
226 | 214 | return new SnowmanIdentifier("snowman" + testEnv.testId(), "catalog-admin" + testEnv.testId()); |
227 | 215 | } |
|
0 commit comments