diff options
Diffstat (limited to 'test/mocks/datafilecollector-testharness/dr-sim')
6 files changed, 9 insertions, 77 deletions
diff --git a/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile index da05eed58..cbe30366c 100644 --- a/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile +++ b/test/mocks/datafilecollector-testharness/dr-sim/Dockerfile @@ -7,7 +7,6 @@ WORKDIR /app COPY dmaapDR.js ./ COPY dmaapDR_redir.js ./ COPY package*.json ./ -COPY cert/ cert/ RUN npm install express RUN npm install argparse diff --git a/test/mocks/datafilecollector-testharness/dr-sim/cert/certificate.crt b/test/mocks/datafilecollector-testharness/dr-sim/cert/certificate.crt deleted file mode 100644 index df5a9acdb..000000000 --- a/test/mocks/datafilecollector-testharness/dr-sim/cert/certificate.crt +++ /dev/null @@ -1,21 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDijCCAnICCQDwhiz1dOajRzANBgkqhkiG9w0BAQUFADCBhjELMAkGA1UEBhMC -U0UxEjAQBgNVBAgMCXN0b2NraG9sbTESMBAGA1UEBwwJc3RvY2tob2xtMQwwCgYD -VQQKDANlc3QxCzAJBgNVBAsMAnJkMQswCQYDVQQDDAJyZDEnMCUGCSqGSIb3DQEJ -ARYYbWFydGluLnlhbi5zZXVAZ21haWwuY29tMB4XDTE4MDkyNjA5MjQyOVoXDTE4 -MTAyNjA5MjQyOVowgYYxCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlzdG9ja2hvbG0x -EjAQBgNVBAcMCXN0b2NraG9sbTEMMAoGA1UECgwDZXN0MQswCQYDVQQLDAJyZDEL -MAkGA1UEAwwCcmQxJzAlBgkqhkiG9w0BCQEWGG1hcnRpbi55YW4uc2V1QGdtYWls -LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANk/J7FGpQw/NCXx -ZTqCstNOZrpA4jvHPHFpxzsWRPVdugEaZpshmQB0Riwk0uSWCW0XnNWu1sYnMnhp -OeF2Npk/uTwndm5kMWxTul6h0bklw5k9Icbf4mFJssLouyeTWQxgFjpn6vSD4INC -c8/vJKEmoFQHbuV4Ei4dUmhITKdXg6hWqD7jQCF2tHNQK0wceCahzvdYOBq5S9LF -wLlf1FSmlTDdJjQptp18ZxBqRByePcbPk/6QW+su9tRQKXBAYxs33yUhlDDcU7hn -BqIVH/u2CEcSyhs8IJ872HrMonOHhJq9cMfr3Knc2tsESSJykBqSF4blkQq1xIkN -cjcQaDMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEAQjoyXaSmu+eWC+AhPz63Ikwn -QsOEET602iwO6zERe3O1cr2ZtxSzWO5LOmHCEQTZvDc3K+rtbqzruzdSE47l6vWb -E6h1R2+SORs9fUuRN+HYTonpxSnNLcz2p1+874BKrnBofJBK+EUFbhV589Iar0Lz -bkFDzmfWEgrr+Io7gW9bLW5q3yX7dAU7W7Dd4sYe+Afu1LlQPg3fLZO6lA09r5kc -nu+Nu4qFhgY5pOUvtO8Yu3B+MnNk8m8xbba5oADgKtGCH0wZlM9P4Gb50v+L7Je1 -zFqVtvBTHoKXjrEQynyZXJVxtkr7eX/sZRoCVSuhiouL5MGyn6RTrDbBwzulpw== ------END CERTIFICATE----- diff --git a/test/mocks/datafilecollector-testharness/dr-sim/cert/mydomain.csr b/test/mocks/datafilecollector-testharness/dr-sim/cert/mydomain.csr deleted file mode 100644 index da609a6f3..000000000 --- a/test/mocks/datafilecollector-testharness/dr-sim/cert/mydomain.csr +++ /dev/null @@ -1,18 +0,0 @@ ------BEGIN CERTIFICATE REQUEST----- -MIIC4zCCAcsCAQAwgYYxCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlzdG9ja2hvbG0x -EjAQBgNVBAcMCXN0b2NraG9sbTEMMAoGA1UECgwDZXN0MQswCQYDVQQLDAJyZDEL -MAkGA1UEAwwCcmQxJzAlBgkqhkiG9w0BCQEWGG1hcnRpbi55YW4uc2V1QGdtYWls -LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANk/J7FGpQw/NCXx -ZTqCstNOZrpA4jvHPHFpxzsWRPVdugEaZpshmQB0Riwk0uSWCW0XnNWu1sYnMnhp -OeF2Npk/uTwndm5kMWxTul6h0bklw5k9Icbf4mFJssLouyeTWQxgFjpn6vSD4INC -c8/vJKEmoFQHbuV4Ei4dUmhITKdXg6hWqD7jQCF2tHNQK0wceCahzvdYOBq5S9LF -wLlf1FSmlTDdJjQptp18ZxBqRByePcbPk/6QW+su9tRQKXBAYxs33yUhlDDcU7hn -BqIVH/u2CEcSyhs8IJ872HrMonOHhJq9cMfr3Knc2tsESSJykBqSF4blkQq1xIkN -cjcQaDMCAwEAAaAXMBUGCSqGSIb3DQEJBzEIDAZzZWNyZXQwDQYJKoZIhvcNAQEL -BQADggEBAHFdQI+uj5nPOLVtzpedYuPMe/z6xwKTFNBGtaBO45aQvIaBvBkSAe55 -AoNjHcuNIPpTWWk7VSz3P03gVIW8RQNkuqJ+G5XyxJPtZRyjZxF5tFXM9Qnia+oI -MnPqpXLw4A5h5oR2MePAj8GaQxanD8KhoaRvPvcP4pR0uk8UpfTn8mTF2WNkErBb -yDdfC5+Dm5S6NpPZFWcIAqQ73dtYN4BkSvfSrkTRAhIU0gFHeOJfp0Y25qHWfgZc -wsU3OpbqzVHqjbsEWo4AC06U8H8kSjf4Z0e8ry6mabgEF/ukODcbZQpG77pbwgZ3 -tKkgxuGf8ylgr672GliitonkTusB2QY= ------END CERTIFICATE REQUEST----- diff --git a/test/mocks/datafilecollector-testharness/dr-sim/cert/private.key b/test/mocks/datafilecollector-testharness/dr-sim/cert/private.key deleted file mode 100644 index c9fc39e06..000000000 --- a/test/mocks/datafilecollector-testharness/dr-sim/cert/private.key +++ /dev/null @@ -1,28 +0,0 @@ ------BEGIN PRIVATE KEY----- -MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDZPyexRqUMPzQl -8WU6grLTTma6QOI7xzxxacc7FkT1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0UKF9z1RhCnoiCZGFLtY5tZwRlT0/K/K2sRxu4RZxQb4hpw5/zMiXTicrZjX -XD4soZgKY5tEOos4GpLBULNJI6/F7jvzXkesBk1K7N6pyC+HZFBKNt/jywKBgQC2 -J5gs+XmX2cKEY7BlyJguXDqrZrVdfiDZODnRVI/SMO/t0czfz4U28przuhmiXu94 -ESxbsa9w71ezcDlXGMmehXo50wl/RzdgaaGZK0Z2RtKG3vdWvwSSaf3lFJS6SfOg -L6kYtdFMdXNbqYRyD5QAOw0NYbtK5e4cAzSpCVOswQKBgQCkVFcuk58MwtJDhlJz -xQFOqFb8uDB4ab2O+eJuW2CnKuX34uS0oSUgkIDUsX8riCptZeQLWFrz1d9j7GRy -I4JdvvTA4rWx7wPGRlOuC0W7EXolGgOEu2L0uvbO8wpTfS6lM3Bv0K0RdR3ORQjR -MtevE5IzvzTMrVcv7kPsl9mNVw== ------END PRIVATE KEY----- diff --git a/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR.js b/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR.js index e307cf66f..7acf51034 100644 --- a/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR.js +++ b/test/mocks/datafilecollector-testharness/dr-sim/dmaapDR.js @@ -8,8 +8,8 @@ var fs = require('fs'); const sleep = (milliseconds) => { return new Promise(resolve => setTimeout(resolve, milliseconds)) } -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 feeds="1:A"; //Comma separated list of feedId:filePrefix. Default is feedId=1 and file prefix 'A' @@ -87,7 +87,7 @@ 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) 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); } }); |