Fix up smoke tests

This commit is contained in:
James Allen 2014-02-13 09:33:39 +00:00
parent 46b36839e2
commit 5587ac0acb
4 changed files with 18 additions and 15 deletions

View file

@ -80,7 +80,7 @@ module.exports = (grunt) ->
grunt.loadNpmTasks 'grunt-mocha-test'
grunt.loadNpmTasks 'grunt-shell'
grunt.registerTask 'compile:app', ['clean:app', 'coffee:app', 'coffee:app_src']
grunt.registerTask 'compile:app', ['clean:app', 'coffee:app', 'coffee:app_src', 'coffee:smoke_tests']
grunt.registerTask 'run', ['compile:app', 'concurrent']
grunt.registerTask 'compile:unit_tests', ['clean:unit_tests', 'coffee:unit_tests']

View file

@ -14,20 +14,20 @@ module.exports =
compilesDir: Path.resolve(__dirname + "/../compiles")
clsiCacheDir: Path.resolve(__dirname + "/../cache")
clsi:
# commandRunner: "docker-runner-sharelatex"
# docker:
# image: "quay.io/sharelatex/texlive-full"
# env:
# PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2013/bin/x86_64-linux/"
# HOME: "/tmp"
# socketPath: "/var/run/docker.sock"
# user: "tex"
# clsi:
# commandRunner: "docker-runner-sharelatex"
# docker:
# image: "quay.io/sharelatex/texlive-full"
# env:
# PATH: "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/texlive/2013/bin/x86_64-linux/"
# HOME: "/tmp"
# socketPath: "/var/run/docker.sock"
# user: "tex"
internal:
clsi:
port: 3013
host: ""
host: "localhost"
apis:
clsi:

View file

@ -2,9 +2,9 @@ chai = require("chai")
chai.should()
expect = chai.expect
request = require "request"
Settings = require "../../../app/js/Settings"
Settings = require "settings-sharelatex"
buildUrl = (path) -> "http://localhost:#{Settings.listen.port}/#{path}"
buildUrl = (path) -> "http://#{Settings.internal.clsi.host}:#{Settings.internal.clsi.port}/#{path}"
describe "Running a compile", ->
before (done) ->

View file

@ -9,10 +9,10 @@
request = require("request");
Settings = require("../../../app/js/Settings");
Settings = require("settings-sharelatex");
buildUrl = function(path) {
return "http://localhost:" + Settings.listen.port + "/" + path;
return "http://" + Settings.internal.clsi.host + ":" + Settings.internal.clsi.port + "/" + path;
};
describe("Running a compile", function() {
@ -34,6 +34,9 @@
_this.error = error;
_this.response = response;
_this.body = body;
if (_this.error != null) {
throw _this.error;
}
return done();
});
});