aboutsummaryrefslogtreecommitdiffstats
path: root/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js
diff options
context:
space:
mode:
authorecaiyanlinux <martin.c.yan@est.tech>2019-08-21 12:10:33 +0000
committerDaniel Rose <dr695h@att.com>2019-08-29 17:35:36 +0000
commit796e8fe4255036b5785a2071ddd6a0240464556a (patch)
treeb5d9ee29c9c07d91ea4848dafb12c5ae9cd7336d /test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js
parent190a2f42b5c0af56b8c8da7e05a90ad3999598d3 (diff)
Add tls-init-container to simulator
1.replace dr-sim/dr-redir-sim cert/key 2.update mr-sim, make it support https 3.update ftpes cert/key Change-Id: I7bbde98f352d1e7d7c8775acf3d8af89a6ef7bdc Issue-ID: DCAEGEN2-1702 Signed-off-by: ecaiyanlinux <martin.c.yan@est.tech>
Diffstat (limited to 'test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js')
-rw-r--r--test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js b/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js
index a5f1beb56..9e3454fef 100644
--- a/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js
+++ b/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR_redir.js
@@ -10,8 +10,8 @@ const sleep = (milliseconds) => {
return new Promise(resolve => setTimeout(resolve, milliseconds))
}
var ArgumentParser = require('argparse').ArgumentParser;
-var privateKey = fs.readFileSync('cert/private.key', 'utf8');
-var certificate = fs.readFileSync('cert/certificate.crt', 'utf8');
+var privateKey = fs.readFileSync('cert/key.pem', 'utf8');
+var certificate = fs.readFileSync('cert/cert.pem', 'utf8');
var credentials = {key: privateKey, cert: certificate};
var total_first_publish=0;
@@ -68,7 +68,7 @@ if (args.tc==tc_normal) {
} else if (args.tc==tc_no_publish) {
console.log("TC: " + args.tc)
-
+
} else if (args.tc==tc_10p_no_response) {
console.log("TC: " + args.tc)
@@ -80,13 +80,13 @@ if (args.tc==tc_normal) {
} else if (args.tc==tc_all_delay_1s) {
console.log("TC: " + args.tc)
-
+
} else if (args.tc==tc_all_delay_10s) {
console.log("TC: " + args.tc)
} else if (args.tc==tc_10p_delay_10s) {
console.log("TC: " + args.tc)
-
+
} else if (args.tc==tc_10p_error_response) {
console.log("TC: " + args.tc)
@@ -327,7 +327,7 @@ app.put('/publish/:feedId/:filename', function (req, res) {
console.log(filename);
//Create filename (appending file size and feedid to name) to store
- var storedFilename = path.resolve(__dirname, filename+"-"+feedId+"-"+req.body.length);
+ var storedFilename = path.resolve(__dirname, filename+"-"+feedId+"-"+req.body.length);
fs.writeFile(storedFilename, "", function (error) { //Store file with zero size
if (error) { console.error(error); }
});