Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event director #150

Merged
merged 9 commits into from
Jun 3, 2024
2 changes: 1 addition & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
FUNCTION_NAME="channel-router-setup-processor"
FUNCTION_NAME="event-director"
NODE_ENV="dev"
REST_PORT=3000
CACHETTL=300
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
run: npm run start &

- name: Test Processor
run: newman run https://raw.githubusercontent.com/frmscoe/postman/main/micro_processors/ChannelRouterSetupProcessor_Proxy_Test.postman_collection.json --iteration-count ${{ env.ITERATION_COUNT }} -e ${{ env.ENV_NEWMAN }} --timeout-request 10200 -r json --reporter-json-export fullReport.json
run: newman run https://raw.githubusercontent.com/frmscoe/postman/main/micro_processors/EventDirectorSetupProcessor_Proxy_Test.postman_collection.json --iteration-count ${{ env.ITERATION_COUNT }} -e ${{ env.ENV_NEWMAN }} --timeout-request 10200 -r json --reporter-json-export fullReport.json

- name: Extract Specific Field
id: newman_test
Expand Down
30 changes: 15 additions & 15 deletions __tests__/postman/3.1. CRSP Quick-Check.postman_collection.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"info": {
"_postman_id": "0c0a8fb4-1cbe-4f86-8eb8-50bce0da9026",
"name": "3.1. CRSP Quick-Check",
"name": "3.1. Event Director Quick-Check",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
"_exporter_id": "29185806"
},
Expand All @@ -14,12 +14,12 @@
"script": {
"exec": [
"responseJSON = pm.response.json();\r",
"let outgoingCRSPResult = responseJSON.data;\r",
"let transaction = outgoingCRSPResult.transaction\r",
"let networkMap = outgoingCRSPResult.networkMap\r",
"let dataCache = outgoingCRSPResult.DataCache\r",
"let metaData = outgoingCRSPResult.metaData;\r",
"let prcgTm = outgoingCRSPResult.metaData.prcgTmCRSP;\r",
"let outgoingEventDirectorResult = responseJSON.data;\r",
"let transaction = outgoingEventDirectorResult.transaction\r",
"let networkMap = outgoingEventDirectorResult.networkMap\r",
"let dataCache = outgoingEventDirectorResult.DataCache\r",
"let metaData = outgoingEventDirectorResult.metaData;\r",
"let prcgTm = outgoingEventDirectorResult.metaData.prcgTmEventDirector;\r",
"let msg = networkMap.messages;\r",
"\r",
"console.log(`Networkmap message: ${JSON.stringify(msg)}`);\r",
Expand All @@ -29,19 +29,19 @@
"});\r",
"\r",
"pm.test('Has a transaction object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('transaction');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('transaction');\r",
"});\r",
"\r",
"pm.test('Has a networkMap object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('networkMap');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('networkMap');\r",
"});\r",
"\r",
"pm.test('Has a dataCache object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('DataCache');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('DataCache');\r",
"});\r",
"\r",
"pm.test('Has a metaData object', function() {\r",
" pm.expect(outgoingCRSPResult).to.have.property('metaData');\r",
" pm.expect(outgoingEventDirectorResult).to.have.property('metaData');\r",
"});\r",
"\r",
"pm.test('Networkmap message array contains typologies', function() {\r",
Expand All @@ -68,10 +68,10 @@
"let moment = require('moment');\r",
"// ## Set up rule config\r",
"\r",
"const requestDestination = `CRSP`;\r",
"const requestDestination = `event-director`;\r",
"const responseDestination = `[email protected]`;\r",
"\r",
"console.log(`CRSP - Full Network Map`);\r",
"console.log(`Event-Director - Full Network Map`);\r",
"\r",
"// ## Set up transaction eco-system\r",
"\r",
Expand Down Expand Up @@ -117,12 +117,12 @@
}
},
"url": {
"raw": "{{natsUrl}}/{{path-channel-router-setup-processor}}",
"raw": "{{natsUrl}}/{{path-event-director}}",
"host": [
"{{natsUrl}}"
],
"path": [
"{{path-channel-router-setup-processor}}"
"{{path-event-director}}"
]
}
},
Expand Down
2 changes: 1 addition & 1 deletion deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
protocol: TCP
resources: {}
imagePullPolicy: Always
- name: crsp-sidecar-rel-1-0-0
- name: ed-sidecar-rel-1-0-0
image: example.io/sidecar-rel-1-0-0:1.0.0
ports:
- name: http
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

services:
node:
container_name: crsp
container_name: event-director
build:
dockerfile: Dockerfile
context: .
Expand Down
Loading
Loading