Skip to content
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: 5 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,10 @@ class LibConsoleCLI {
)).id
} else { // default is jwt
credentialId = (await this.createEnterpriseCredentials(orgId, project, workspace, certDir)).id
credentialType = 'entp'
}
} else { // If using an existing credential, ignore the passed credential type. If it's a service credential, use 'entp'...
credentialType = credential.integration_type === 'service' ? 'entp' : credential.integration_type
}

spinner.start(`Attaching Services to the ${credentialType} Credentials of Workspace ${workspace.name}...`)
Expand All @@ -368,7 +371,7 @@ class LibConsoleCLI {
orgId,
project.id,
workspace.id,
'entp',
credentialType,
credentialId,
serviceInfo
)).body
Expand Down Expand Up @@ -768,7 +771,7 @@ class LibConsoleCLI {
}

LibConsoleCLI.JWT_CREDENTIAL = 'jwt'
LibConsoleCLI.OAUTH_SERVER_TO_SERVER_CREDENTIAL = 'oauth server-to-server'
LibConsoleCLI.OAUTH_SERVER_TO_SERVER_CREDENTIAL = 'oauth_server_to_server'

// static function making sure there are no spinner running (e.g. in case of error)
LibConsoleCLI.cleanStdOut = () => { spinner.stop() }
Expand Down
6 changes: 3 additions & 3 deletions test/lib/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ describe('instance methods tests', () => {
orgId,
projectId,
workspaceId,
integrations[0].flow_type,
integrations[0].integration_type,
integrations[0].id_integration,
dataMocks.subscribeServicesPayload
)
Expand All @@ -399,7 +399,7 @@ describe('instance methods tests', () => {
orgId,
projectId,
workspaceId,
integrations[0].flow_type,
integrations[0].integration_type,
integrations[0].id_integration,
dataMocks.subscribeServicesPayload
)
Expand Down Expand Up @@ -569,7 +569,7 @@ describe('instance methods tests', () => {
orgId,
projectId,
workspaceId,
oauthS2SCredential.flow_type,
oauthS2SCredential.integration_type,
oauthS2SCredential.id_integration,
dataMocks.subscribeServicesPayload
)
Expand Down
Loading