Skip to content
Snippets Groups Projects
Commit c0cda490 authored by Hema Vishnu Pola [Microsoft]'s avatar Hema Vishnu Pola [Microsoft]
Browse files

Merge branch 'data_partitioning_opendes' into 'master'

Making service opendes complaint

See merge request !28
parents 1a1b9356 70a12b99
No related branches found
No related tags found
1 merge request!28Making service opendes complaint
Pipeline #12603 failed
...@@ -21,13 +21,13 @@ public class AzureCosmosProperties { ...@@ -21,13 +21,13 @@ public class AzureCosmosProperties {
@Bean @Bean
@Named("COSMOS_ENDPOINT") @Named("COSMOS_ENDPOINT")
public String cosmosEndpoint(SecretClient kv) { public String cosmosEndpoint(SecretClient kv) {
return getKeyVaultSecret(kv, "cosmos-endpoint"); return getKeyVaultSecret(kv, "opendes-cosmos-endpoint");
} }
@Bean @Bean
@Named("COSMOS_KEY") @Named("COSMOS_KEY")
public String cosmosKey(SecretClient kv) { public String cosmosKey(SecretClient kv) {
return getKeyVaultSecret(kv, "cosmos-primary-key"); return getKeyVaultSecret(kv, "opendes-cosmos-primary-key");
} }
@Bean @Bean
......
...@@ -32,7 +32,6 @@ aad.oboApi=${aad_client_id} ...@@ -32,7 +32,6 @@ aad.oboApi=${aad_client_id}
azure.application-insights.instrumentation-key=${appinsights_key} azure.application-insights.instrumentation-key=${appinsights_key}
# Azure CosmosDB configuration # Azure CosmosDB configuration
azure.cosmosdb.uri=${cosmosdb_account}
azure.cosmosdb.database=${cosmosdb_database} azure.cosmosdb.database=${cosmosdb_database}
tenantInfo.container.name=TenantInfo tenantInfo.container.name=TenantInfo
......
...@@ -52,14 +52,14 @@ public class AzureCosmosPropertiesTest { ...@@ -52,14 +52,14 @@ public class AzureCosmosPropertiesTest {
IllegalStateException exception = assertThrows(IllegalStateException.class, () -> sut.cosmosKey(kv)); IllegalStateException exception = assertThrows(IllegalStateException.class, () -> sut.cosmosKey(kv));
// Assert // Assert
assertEquals("No secret found with name cosmos-primary-key", exception.getMessage()); assertEquals("No secret found with name opendes-cosmos-primary-key", exception.getMessage());
} }
@Test @Test
public void should_returnRightCosmosKey_getCosmosKey() { public void should_returnRightCosmosKey_getCosmosKey() {
// Set-Up // Set-Up
doReturn("cosmos-key-secret").when(secret).getValue(); doReturn("cosmos-key-secret").when(secret).getValue();
doReturn(secret).when(kv).getSecret("cosmos-primary-key"); doReturn(secret).when(kv).getSecret("opendes-cosmos-primary-key");
// Act // Act
String secretValue = sut.cosmosKey(kv); String secretValue = sut.cosmosKey(kv);
...@@ -72,7 +72,7 @@ public class AzureCosmosPropertiesTest { ...@@ -72,7 +72,7 @@ public class AzureCosmosPropertiesTest {
public void should_returnRightCosmosSecret_getCosmosKey() { public void should_returnRightCosmosSecret_getCosmosKey() {
// Set-Up // Set-Up
doReturn("cosmos-endpoint-secret").when(secret).getValue(); doReturn("cosmos-endpoint-secret").when(secret).getValue();
doReturn(secret).when(kv).getSecret("cosmos-endpoint"); doReturn(secret).when(kv).getSecret("opendes-cosmos-endpoint");
// Act // Act
String secretValue = sut.cosmosEndpoint(kv); String secretValue = sut.cosmosEndpoint(kv);
......
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