moved test channel & password to config file

This commit is contained in:
bill bittner 2017-12-21 09:46:46 -08:00
parent e7bb724e5f
commit 00108aebb8
2 changed files with 9 additions and 3 deletions

View file

@ -31,4 +31,8 @@ module.exports = {
defaultThumbnail : 'https://spee.ch/assets/img/video_thumb_default.png',
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
},
};

View file

@ -1,7 +1,9 @@
const chai = require('chai');
const expect = chai.expect;
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 publishTimeout = 120000;
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 filePath = './test/mock-data/bird.jpeg';
const fileName = 'byrd.jpeg';
const channelName = '@testpublishchannel';
const channelPassword = 'password';
const channelName = testChannel;
const channelPassword = testChannelPassword;
describe(publishUrl, function () {
it(`non-channel publishes should receive a status code 200 within ${publishTimeout}ms @usesLbc`, function (done) {