James Allen 12 лет назад
Родитель
Сommit
5587ac0acb

+ 1 - 1
services/clsi/Gruntfile.coffee

@@ -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']

+ 10 - 10
services/clsi/config/settings.testing.coffee

@@ -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:

+ 2 - 2
services/clsi/test/smoke/coffee/SmokeTests.coffee

@@ -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) ->

+ 5 - 2
services/clsi/test/smoke/js/SmokeTests.js

@@ -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();
       });
     });