From c6fa0cc0723f6304ab1c0528e5ae229d18396f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= Date: Fri, 10 Mar 2017 18:21:06 -0300 Subject: [PATCH] Add test for check MM_PORT enviroment variable --- tests/e2e/port_config.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tests/e2e/port_config.js b/tests/e2e/port_config.js index c0806e85..e44a2207 100644 --- a/tests/e2e/port_config.js +++ b/tests/e2e/port_config.js @@ -29,4 +29,19 @@ describe("port directive configuration", function () { }); }); }); + + describe("Set port 8100 on enviroment variable MM_PORT", function () { + before(function() { + process.env.MM_PORT = 8100; + // Set config sample for use in this test + process.env.MM_CONFIG_FILE = "tests/configs/port_8090.js"; + }); + it("should return 200", function (done) { + request.get("http://localhost:8100", function (err, res, body) { + expect(res.statusCode).to.equal(200); + done(); + }); + }); + }); + });