mirror of
https://github.com/MichMich/MagicMirror.git
synced 2025-06-28 12:12:20 +00:00
Test change port configuration
This test change to 8090 port on configuration and check if system response there.
This commit is contained in:
parent
6ea1732630
commit
4fdd12bc48
25
tests/configs/port_8090.js
Normal file
25
tests/configs/port_8090.js
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* Magic Mirror Test config sample enviroment set por 8090
|
||||||
|
*
|
||||||
|
* By Rodrigo Ramírez Norambuena https://rodrigoramirez.com
|
||||||
|
* MIT Licensed.
|
||||||
|
*/
|
||||||
|
|
||||||
|
var config = {
|
||||||
|
port: 8090,
|
||||||
|
ipWhitelist: ["127.0.0.1", "::ffff:127.0.0.1", "::1"],
|
||||||
|
|
||||||
|
language: "en",
|
||||||
|
timeFormat: 24,
|
||||||
|
units: "metric",
|
||||||
|
electronOptions: {
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
modules: [
|
||||||
|
]
|
||||||
|
};
|
||||||
|
|
||||||
|
/*************** DO NOT EDIT THE LINE BELOW ***************/
|
||||||
|
if (typeof module !== "undefined") {module.exports = config;}
|
32
tests/e2e/port_config.js
Normal file
32
tests/e2e/port_config.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
const globalSetup = require("./global-setup");
|
||||||
|
const app = globalSetup.app;
|
||||||
|
const request = require("request");
|
||||||
|
const chai = require("chai");
|
||||||
|
const expect = chai.expect;
|
||||||
|
|
||||||
|
|
||||||
|
describe("port directive configuration", function () {
|
||||||
|
|
||||||
|
this.timeout(20000);
|
||||||
|
|
||||||
|
beforeEach(function (done) {
|
||||||
|
app.start().then(function() { done(); } );
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(function (done) {
|
||||||
|
app.stop().then(function() { done(); });
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("Set port 8090", function () {
|
||||||
|
before(function() {
|
||||||
|
// 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:8090", function (err, res, body) {
|
||||||
|
expect(res.statusCode).to.equal(200);
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user