Skip to content
This repository was archived by the owner on Oct 28, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions src/test/groovy/ApmCliStepTests.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,8 @@ class ApmCliStepTests extends ApmBasePipelineTest {
@Test
void testVaultConfig() throws Exception {
helper.registerAllowedMethod('getVaultSecret', [Map.class],
{ return [
"data": [
"value": '{"url": "https://vaultapm.example.com:8200", "token": "vaultApmPassword"}'
]
]
{
return [data: [value: '{"url": "https://vaultapm.example.com:8200", "token": "vaultApmPassword"}' ]]
})

script.call(apmCliConfig: "secret/oblt/apm", serviceName: "serviceFoo")
Expand Down
2 changes: 1 addition & 1 deletion vars/apmCli.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def call(Map args = [:]) {

if(!url && !token){
def apmJson = getVaultSecret(secret: "${apmCliConfig}")?.data.value
def apm = readJSON(text: apmJson)
def apm = toJSON(apmJson)
url = apm.url
token = apm.token
}
Expand Down