diff --git a/src/plugins/meteor/__tests__/index.js b/src/plugins/meteor/__tests__/index.js index c14cfd89..79ec9849 100644 --- a/src/plugins/meteor/__tests__/index.js +++ b/src/plugins/meteor/__tests__/index.js @@ -254,7 +254,7 @@ describe('module - meteor', function() { expect(out.output).to.have.entriesCount('Prepare Bundle: SUCCESS', 1); }); - it('should allow overriding PORT on specific servers', async () => { + it.only('should allow overriding PORT on specific servers', async () => { sh.cd(path.resolve(os.tmpdir(), 'tests/project-1')); sh.exec('mup --config mup.override-port.js setup'); @@ -262,7 +262,13 @@ describe('module - meteor', function() { await checkDeploy(out, 'Codestin Search App', 4000); + sh.exec('mup docker ps'); + sh.exec('mup logs'); + const status = sh.exec('mup --config mup.override-port.js meteor status'); + sh.exec('mup docker ps'); + sh.exec('mup logs'); + expect(status.output).to.have.entriesCount('- 3000/tcp => 4000', 1); expect(status.output).to.have.entriesCount(`App running at http://${serverInfo.host}:4000`, 1); expect(status.output).to.have.entriesCount('Available in app\'s docker container: true', 1); diff --git a/src/plugins/meteor/status.js b/src/plugins/meteor/status.js index a457ab10..a663115e 100644 --- a/src/plugins/meteor/status.js +++ b/src/plugins/meteor/status.js @@ -2,9 +2,11 @@ import axios from 'axios'; import chalk from 'chalk'; export function getInformation(server, appName, api) { - return api.runSSHCommand(server, `docker inspect ${appName} --format "{{json .}}"`) + return api.runSSHCommand(server, `sudo docker inspect ${appName} --format "{{json .}}"`) // eslint-disable-next-line complexity .then(({ host, output }) => { + console.log(appName); + console.dir(output); let info; const stoppedResult = { statusColor: 'red', @@ -128,7 +130,7 @@ export async function checkUrls(server, appConfig, api) { local ] = await Promise.all([ api.runSSHCommand(server, `curl ${getCheckAddress(server, appConfig)}:${port}`), - api.runSSHCommand(server, `docker exec ${appConfig.name} curl http://localhost:${appConfig.docker.imagePort}`), + api.runSSHCommand(server, `sudo docker exec ${appConfig.name} curl http://localhost:${appConfig.docker.imagePort}`), checkUrlLocally(server, appConfig, port) ]); const inDockerResult = inDocker.code === 0;