aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/dr-sim
diff options
context:
space:
mode:
authorBjornMagnussonXA <bjorn.magnusson@est.tech>2019-03-22 09:48:38 +0000
committerBjornMagnussonXA <bjorn.magnusson@est.tech>2019-03-22 09:48:38 +0000
commitf8b34f0d559711d14b95baabcb07e55d5dd9190e (patch)
tree6b7ea608e76efc170b184187daa1cb4dc80da2ed /test/mocks/datafilecollector-testharness/dr-sim
parent921c7baee8511eac0aa972139df3a238ac56299b (diff)
Updated simulators for DFC
mr sim has a number of new test cases Docker files/docker compose files added. Minor adjustment to scripts. Issue-ID: DCAEGEN2-1313 Change-Id: I0246a9d5c855cda4e7dea9830928cae98c5e1284 Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
Diffstat (limited to 'test/mocks/datafilecollector-testharness/dr-sim')
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/Dockerfile18
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/README.md6
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml17
3 files changed, 41 insertions, 0 deletions
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile
new file mode 100644
index 000000000..fc903d7e7
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile
@@ -0,0 +1,18 @@
+#Common image for both dmmapDR and dmaapDR_redir
+
+FROM node:8
+
+WORKDIR /app
+
+COPY dmaapDR.js ./
+COPY dmaapDR_redir.js ./
+COPY package*.json ./
+COPY cert/ cert/
+
+RUN npm install express
+RUN npm install argparse
+
+EXPOSE 3906
+EXPOSE 3907
+EXPOSE 3908
+EXPOSE 3909 \ No newline at end of file
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/README.md b/test/mocks/datafilecollector-testharness/dr-sim/README.md
index 38ad1c522..f0cdf589b 100644
--- a/test/mocks/datafilecollector-testharness/dr-sim/README.md
+++ b/test/mocks/datafilecollector-testharness/dr-sim/README.md
@@ -1,3 +1,9 @@
+#Alternative to running python (as described below) on your machine, use the docker files.
+1. Build docker container with ```docker build -t drsim_common:latest .```
+2. Run the container ```docker-compose up```
+
+
+
1. install nodejs
2. install npm
Make sure that you run these commands in the application directory "dr-sim"
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml b/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml
new file mode 100644
index 000000000..1ad478886
--- /dev/null
+++ b/test/mocks/datafilecollector-testharness/dr-sim/docker-compose.yml
@@ -0,0 +1,17 @@
+version: '2'
+services:
+ drsim:
+ image: drsim_common:latest
+ ports:
+ - "3906:3906"
+ - "3907:3907"
+ container_name: drsim
+ command: node dmaapDR.js
+
+ drsim_redir:
+ image: drsim_common:latest
+ ports:
+ - "3908:3908"
+ - "3909:3909"
+ container_name: drsim_redir
+ command: node dmaapDR_redir.js \ No newline at end of file