Commit 97e1d02a authored by Girish Ramakrishnan's avatar Girish Ramakrishnan

make the tests work

parent 2d7aef4d
......@@ -72,8 +72,8 @@ function populateMongodb(callback) {
let db = client.db(process.env.CLOUDRON_MONGO_DATABASE);
db.createCollection('test', { strict: false }, function (error, collection) {
collection.insert({ 'cloudron': 'rocks' }, function (error) {
db.close();
collection.insertOne({ 'cloudron': 'rocks' }, function (error) {
client.close();
callback(error);
});
});
......@@ -178,7 +178,7 @@ function checkMongodb(callback) {
var db = client.db(process.env.CLOUDRON_MONGO_DATABASE);
var collection = db.collection('test');
collection.findOne({ 'cloudron': 'rocks' }, function (error, item) {
db.close();
client.close();
if (error) return callback(error);
if (!item) return callback(new Error('Query returned empty result'));
......
This diff is collapsed.
......@@ -32,7 +32,7 @@ describe('Test app', function () {
console.log();
it('can install app', function () {
execSync(`cloudron install --new --wait --location ${LOCATION}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
execSync(`cloudron install --location ${LOCATION}`, { cwd: path.resolve(__dirname, '..'), stdio: 'inherit' });
var inspect = JSON.parse(execSync('cloudron inspect'));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment