moved test channel & password to config file
This commit is contained in:
parent
e7bb724e5f
commit
00108aebb8
2 changed files with 9 additions and 3 deletions
|
@ -31,4 +31,8 @@ module.exports = {
|
||||||
defaultThumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',
|
defaultThumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',
|
||||||
defaultDescription: 'Open-source, decentralized image and video sharing.',
|
defaultDescription: 'Open-source, decentralized image and video sharing.',
|
||||||
},
|
},
|
||||||
|
testing: {
|
||||||
|
testChannel : '@testpublishchannel', // a channel to make test publishes in
|
||||||
|
testChannelPassword: 'password', // password for the test channel
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
const chai = require('chai');
|
const chai = require('chai');
|
||||||
const expect = chai.expect;
|
const expect = chai.expect;
|
||||||
const chaiHttp = require('chai-http');
|
const chaiHttp = require('chai-http');
|
||||||
const { host } = require('../../config/speechConfig.js').site;
|
const { site, testing } = require('../../config/speechConfig.js');
|
||||||
|
const { host } = site;
|
||||||
|
const { testChannel, testChannelPassword } = testing;
|
||||||
const requestTimeout = 20000;
|
const requestTimeout = 20000;
|
||||||
const publishTimeout = 120000;
|
const publishTimeout = 120000;
|
||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
|
@ -88,8 +90,8 @@ describe('end-to-end', function () {
|
||||||
const name = `test-publish-${date.getFullYear()}-${date.getMonth()}-${date.getDate()}-${date.getTime()}`;
|
const name = `test-publish-${date.getFullYear()}-${date.getMonth()}-${date.getDate()}-${date.getTime()}`;
|
||||||
const filePath = './test/mock-data/bird.jpeg';
|
const filePath = './test/mock-data/bird.jpeg';
|
||||||
const fileName = 'byrd.jpeg';
|
const fileName = 'byrd.jpeg';
|
||||||
const channelName = '@testpublishchannel';
|
const channelName = testChannel;
|
||||||
const channelPassword = 'password';
|
const channelPassword = testChannelPassword;
|
||||||
|
|
||||||
describe(publishUrl, function () {
|
describe(publishUrl, function () {
|
||||||
it(`non-channel publishes should receive a status code 200 within ${publishTimeout}ms @usesLbc`, function (done) {
|
it(`non-channel publishes should receive a status code 200 within ${publishTimeout}ms @usesLbc`, function (done) {
|
||||||
|
|
Loading…
Reference in a new issue