Skip to content

Commit

Permalink
Add test for Mongo 6
Browse files Browse the repository at this point in the history
  • Loading branch information
zodern committed Oct 11, 2024
1 parent 55db1f5 commit d2e7c99
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/plugins/mongo/__tests__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,21 @@ describe('module - mongo', function() {
(await runSSHCommand(serverInfo, 'nc -z -v -w5 localhost 27017')).code
).to.be.equal(1);
});

it('should start Mongo 6', async () => {
const serverInfo = servers.mymongo;
sh.cd(path.resolve(os.tmpdir(), 'tests/project-mongo-6'));
sh.exec('mup docker setup && mup mongo setup');

const out = sh.exec('mup mongo start');
expect(out.code).to.be.equal(0);

expect(countOccurrences('Start Mongo: SUCCESS', out.stdout)).to.be.equal(
1
);
expect(
(await runSSHCommand(serverInfo, 'nc -z -v -w5 localhost 27017')).code
).to.be.equal(0);
});
});
});
38 changes: 38 additions & 0 deletions tests/fixtures/project-mongo-6/mup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* eslint-disable */
var path = require('path');

var meteorPath = path.resolve('..', 'helloapp');
var serverFile = path.resolve('..', 'servers');
var servers = require(serverFile);

module.exports = {
servers: servers,
meteor: {
name: 'myapp',
path: meteorPath,
servers: {
mymeteor: {
env: {
TEST: true
}
}
},
env: {
ROOT_URL: 'http://' + servers.mymeteor.host + '.com',
MONGO_URL: 'mongodb://mongodb:27017/meteor'
},
log: {
driver: 'syslog'
},
docker: {
image: 'zodern/meteor'
},
deployCheckWaitTime: 300
},
mongo: {
version: '6.0.18',
servers: {
mymongo: {}
}
}
};

0 comments on commit d2e7c99

Please sign in to comment.