Skip to content

Commit

Permalink
feat(mojaloop/#3129)!: seperate mongodb uri config (#945)
Browse files Browse the repository at this point in the history
* feat(mojaloop/#3131)!: seperate mongodb uri config

* chore: fix config

* chore: disable test functional

* chore(snapshot): 17.0.0-snapshot.0

* chore: reenable functional tests

* miss

* chore: port string

* chore: explicit

* chore: bump harness version

* chore: modify harness config

* chore: config
  • Loading branch information
kleyow authored Feb 23, 2023
1 parent c376af8 commit fc34231
Show file tree
Hide file tree
Showing 9 changed files with 1,407 additions and 654 deletions.
7 changes: 4 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,11 +245,11 @@ jobs:
echo $! > /tmp/int-test-service.pid
PID=$(cat /tmp/int-test-service.pid)
echo "Service started with Process ID=$PID"
## Check Service Health
echo "Waiting for Service to be healthy"
bash .circleci/curl-retry-cl-health.sh
## Lets wait a few seconds to ensure that Kafka handlers are rebalanced
echo "Waiting ${WAIT_FOR_REBALANCE}s for Kafka Re-balancing..." && sleep $WAIT_FOR_REBALANCE
Expand Down Expand Up @@ -290,10 +290,11 @@ jobs:
- run:
name: Download the mojaloop/ml-core-test-harness repo
command: |
git clone --depth 1 --branch v0.0.2 https://github.com/mojaloop/ml-core-test-harness.git /tmp/ml-core-test-harness
git clone --depth 1 --branch v0.0.3 https://github.com/mojaloop/ml-core-test-harness.git /tmp/ml-core-test-harness
- run:
name: Execute TTK functional tests
command: |
cp ./docker/config-modifier/configs/central-ledger.js /tmp/ml-core-test-harness/docker/config-modifier/configs/central-ledger.js
cd /tmp/ml-core-test-harness
export CENTRAL_LEDGER_VERSION=local
docker-compose --project-name ttk-func --ansi never --profile all-services --profile ttk-provisioning --profile ttk-tests up -d
Expand Down
6 changes: 5 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
"MONGODB": {
"DISABLED": true,
"DEBUG": false,
"URI": "mongodb://localhost:27017/mlos"
"HOST": "localhost",
"PORT": 27017,
"USER": "",
"PASSWORD": "",
"DATABASE": "mlos"
},
"ERROR_HANDLING": {
"includeCauseExtension": true,
Expand Down
7 changes: 6 additions & 1 deletion docker/central-ledger/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,12 @@
},
"MONGODB": {
"DISABLED": false,
"URI": "mongodb://objstore:27017/mlos"
"DEBUG": false,
"HOST": "objstore",
"PORT": 27017,
"USER": "",
"PASSWORD": "",
"DATABASE": "mlos"
},
"ERROR_HANDLING": {
"includeCauseExtension": true,
Expand Down
140 changes: 140 additions & 0 deletions docker/config-modifier/configs/central-ledger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
module.exports = {
HOSTNAME: 'http://central-ledger',
DATABASE: {
HOST: 'mysql'
},
MONGODB: {
DISABLED: false,
DEBUG: false,
HOST: 'objstore',
PORT: 27017,
USER: '',
PASSWORD: '',
DATABASE: 'mlos'
},
KAFKA: {
CONSUMER: {
BULK: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
PROCESSING: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
GET: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
TRANSFER: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
GET: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
POSITION: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
ADMIN: {
TRANSFER: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
}
},
PRODUCER: {
BULK: {
PROCESSING: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
TRANSFER: {
PREPARE: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
FULFIL: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
},
POSITION: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
NOTIFICATION: {
EVENT: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
},
ADMIN: {
TRANSFER: {
config: {
rdkafkaConf: {
'metadata.broker.list': 'kafka:29092'
}
}
}
}
}
}
}
Loading

0 comments on commit fc34231

Please sign in to comment.