move processor config to catalog from backend

This commit is contained in:
Omer Farooq
2020-08-29 22:22:19 +12:00
parent a711b6fab4
commit 36376778ec
9 changed files with 29 additions and 29 deletions
@@ -23,7 +23,7 @@ describe('AzureApiReaderProcessor', () => {
{
context: '',
data: {
backend: {
catalog: {
processors: {
azureApi: {
privateToken: token,
@@ -26,7 +26,7 @@ export class AzureApiReaderProcessor implements LocationProcessor {
constructor(config: Config) {
this.privateToken =
(config.getOptional(
'backend.processors.azureApi.privateToken',
'catalog.processors.azureApi.privateToken',
) as string) ?? '';
}
@@ -26,7 +26,7 @@ describe('BitbucketApiReaderProcessor', () => {
{
context: '',
data: {
backend: {
catalog: {
processors: {
bitbucketApi: {
userName: userName,
@@ -27,11 +27,11 @@ export class BitbucketApiReaderProcessor implements LocationProcessor {
constructor(config: Config) {
this.username =
(config.getOptional(
'backend.processors.bitbucketApi.userName',
'catalog.processors.bitbucketApi.userName',
) as string) ?? '';
this.password =
(config.getOptional(
'backend.processors.bitbucketApi.appPassword',
'catalog.processors.bitbucketApi.appPassword',
) as string) ?? '';
}
@@ -23,7 +23,7 @@ describe('GithubApiReaderProcessor', () => {
{
context: '',
data: {
backend: {
catalog: {
processors: {
githubApi: {
privateToken: token,
@@ -26,7 +26,7 @@ export class GithubApiReaderProcessor implements LocationProcessor {
constructor(config: Config) {
this.privateToken =
(config.getOptional(
'backend.processors.githubApi.privateToken',
'catalog.processors.githubApi.privateToken',
) as string) ?? '';
}
@@ -23,7 +23,7 @@ describe('GitlabApiReaderProcessor', () => {
{
context: '',
data: {
backend: {
catalog: {
processors: {
gitlabApi: {
privateToken: token,
@@ -26,7 +26,7 @@ export class GitlabApiReaderProcessor implements LocationProcessor {
constructor(config: Config) {
this.privateToken =
(config.getOptional(
'backend.processors.gitlabApi.privateToken',
'catalog.processors.gitlabApi.privateToken',
) as string) ?? '';
}