Add server URL to tests
This commit is contained in:
@@ -11,11 +11,13 @@ var DatabaseAdapter = require('../src/DatabaseAdapter');
|
|||||||
|
|
||||||
var databaseURI = process.env.DATABASE_URI;
|
var databaseURI = process.env.DATABASE_URI;
|
||||||
var cloudMain = process.env.CLOUD_CODE_MAIN || './cloud/main.js';
|
var cloudMain = process.env.CLOUD_CODE_MAIN || './cloud/main.js';
|
||||||
|
var port = 8378;
|
||||||
|
|
||||||
// Default server configuration for tests.
|
// Default server configuration for tests.
|
||||||
var defaultConfiguration = {
|
var defaultConfiguration = {
|
||||||
databaseURI: databaseURI,
|
databaseURI: databaseURI,
|
||||||
cloud: cloudMain,
|
cloud: cloudMain,
|
||||||
|
serverURL: 'http://localhost:' + port + '/1',
|
||||||
appId: 'test',
|
appId: 'test',
|
||||||
javascriptKey: 'test',
|
javascriptKey: 'test',
|
||||||
dotNetKey: 'windows',
|
dotNetKey: 'windows',
|
||||||
@@ -36,7 +38,6 @@ var defaultConfiguration = {
|
|||||||
var api = new ParseServer(defaultConfiguration);
|
var api = new ParseServer(defaultConfiguration);
|
||||||
var app = express();
|
var app = express();
|
||||||
app.use('/1', api);
|
app.use('/1', api);
|
||||||
var port = 8378;
|
|
||||||
var server = app.listen(port);
|
var server = app.listen(port);
|
||||||
|
|
||||||
// Prevent reinitializing the server from clobbering Cloud Code
|
// Prevent reinitializing the server from clobbering Cloud Code
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ describe('server', () => {
|
|||||||
it('fails if database is unreachable', done => {
|
it('fails if database is unreachable', done => {
|
||||||
setServerConfiguration({
|
setServerConfiguration({
|
||||||
databaseURI: 'mongodb://fake:fake@ds043605.mongolab.com:43605/drew3',
|
databaseURI: 'mongodb://fake:fake@ds043605.mongolab.com:43605/drew3',
|
||||||
|
serverURL: 'http://localhost:8378/1',
|
||||||
appId: 'test',
|
appId: 'test',
|
||||||
javascriptKey: 'test',
|
javascriptKey: 'test',
|
||||||
dotNetKey: 'windows',
|
dotNetKey: 'windows',
|
||||||
|
|||||||
Reference in New Issue
Block a user