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-mocha-test'
grunt.loadNpmTasks 'grunt-shell' 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 'run', ['compile:app', 'concurrent']
grunt.registerTask 'compile:unit_tests', ['clean:unit_tests', 'coffee:unit_tests'] grunt.registerTask 'compile:unit_tests', ['clean:unit_tests', 'coffee:unit_tests']

View file

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

View file

@ -2,9 +2,9 @@ chai = require("chai")
chai.should() chai.should()
expect = chai.expect expect = chai.expect
request = require "request" 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", -> describe "Running a compile", ->
before (done) -> before (done) ->

View file

@ -9,10 +9,10 @@
request = require("request"); request = require("request");
Settings = require("../../../app/js/Settings"); Settings = require("settings-sharelatex");
buildUrl = function(path) { 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() { describe("Running a compile", function() {
@ -34,6 +34,9 @@
_this.error = error; _this.error = error;
_this.response = response; _this.response = response;
_this.body = body; _this.body = body;
if (_this.error != null) {
throw _this.error;
}
return done(); return done();
}); });
}); });