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
Open Subsurface Data Universe Software
Platform
System
Notification
Commits
564f7340
Commit
564f7340
authored
Oct 19, 2020
by
Auto GO3-NRG Ticket
Browse files
Auto commit when pipeline succeeds
parents
8ace9465
c0cda490
Pipeline
#12606
passed with stages
in 15 minutes and 48 seconds
Changes
3
Pipelines
3
Show whitespace changes
Inline
Side-by-side
provider/notification-azure/src/main/java/org/opengroup/osdu/notification/provider/azure/util/AzureCosmosProperties.java
View file @
564f7340
...
...
@@ -21,13 +21,13 @@ public class AzureCosmosProperties {
@Bean
@Named
(
"COSMOS_ENDPOINT"
)
public
String
cosmosEndpoint
(
SecretClient
kv
)
{
return
getKeyVaultSecret
(
kv
,
"cosmos-endpoint"
);
return
getKeyVaultSecret
(
kv
,
"
opendes-
cosmos-endpoint"
);
}
@Bean
@Named
(
"COSMOS_KEY"
)
public
String
cosmosKey
(
SecretClient
kv
)
{
return
getKeyVaultSecret
(
kv
,
"cosmos-primary-key"
);
return
getKeyVaultSecret
(
kv
,
"
opendes-
cosmos-primary-key"
);
}
@Bean
...
...
provider/notification-azure/src/main/resources/application.properties
View file @
564f7340
...
...
@@ -32,7 +32,6 @@ aad.oboApi=${aad_client_id}
azure.application-insights.instrumentation-key
=
${appinsights_key}
# Azure CosmosDB configuration
azure.cosmosdb.uri
=
${cosmosdb_account}
azure.cosmosdb.database
=
${cosmosdb_database}
tenantInfo.container.name
=
TenantInfo
...
...
provider/notification-azure/src/test/java/org/opengroup/osdu/notification/util/AzureCosmosPropertiesTest.java
View file @
564f7340
...
...
@@ -52,14 +52,14 @@ public class AzureCosmosPropertiesTest {
IllegalStateException
exception
=
assertThrows
(
IllegalStateException
.
class
,
()
->
sut
.
cosmosKey
(
kv
));
// 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
public
void
should_returnRightCosmosKey_getCosmosKey
()
{
// Set-Up
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
String
secretValue
=
sut
.
cosmosKey
(
kv
);
...
...
@@ -72,7 +72,7 @@ public class AzureCosmosPropertiesTest {
public
void
should_returnRightCosmosSecret_getCosmosKey
()
{
// Set-Up
doReturn
(
"cosmos-endpoint-secret"
).
when
(
secret
).
getValue
();
doReturn
(
secret
).
when
(
kv
).
getSecret
(
"cosmos-endpoint"
);
doReturn
(
secret
).
when
(
kv
).
getSecret
(
"
opendes-
cosmos-endpoint"
);
// Act
String
secretValue
=
sut
.
cosmosEndpoint
(
kv
);
...
...
Write
Preview
Markdown
is supported
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