mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix up settings schema and acceptance tests
This commit is contained in:
parent
b484f08d6e
commit
ee4a6e869e
6 changed files with 17 additions and 61 deletions
1
services/clsi/.gitignore
vendored
1
services/clsi/.gitignore
vendored
|
@ -12,3 +12,4 @@ app.js
|
|||
cache
|
||||
.vagrant
|
||||
db.sqlite
|
||||
config/*
|
||||
|
|
|
@ -34,27 +34,16 @@ module.exports = (grunt) ->
|
|||
dest: "test/smoke/js"
|
||||
ext: ".js"
|
||||
|
||||
watch:
|
||||
app:
|
||||
files: ['app/coffee/*.coffee']
|
||||
tasks: ['coffee']
|
||||
|
||||
clean:
|
||||
app: ["app/js/"]
|
||||
unit_tests: ["test/unit/js"]
|
||||
acceptance_tests: ["test/acceptance/js"]
|
||||
smoke_tests: ["test/smoke/js"]
|
||||
|
||||
nodemon:
|
||||
dev:
|
||||
options:
|
||||
file: 'app.js'
|
||||
|
||||
concurrent:
|
||||
dev:
|
||||
tasks: ['nodemon', 'watch']
|
||||
options:
|
||||
logConcurrentOutput: true
|
||||
execute:
|
||||
app:
|
||||
src: "app.js"
|
||||
|
||||
mochaTest:
|
||||
unit:
|
||||
|
@ -73,15 +62,14 @@ module.exports = (grunt) ->
|
|||
src: ["test/smoke/js/**/*.js"]
|
||||
|
||||
grunt.loadNpmTasks 'grunt-contrib-coffee'
|
||||
grunt.loadNpmTasks 'grunt-contrib-watch'
|
||||
grunt.loadNpmTasks 'grunt-contrib-clean'
|
||||
grunt.loadNpmTasks 'grunt-nodemon'
|
||||
grunt.loadNpmTasks 'grunt-concurrent'
|
||||
grunt.loadNpmTasks 'grunt-mocha-test'
|
||||
grunt.loadNpmTasks 'grunt-shell'
|
||||
grunt.loadNpmTasks 'grunt-execute'
|
||||
grunt.loadNpmTasks 'grunt-bunyan'
|
||||
|
||||
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', 'bunyan', 'execute']
|
||||
|
||||
grunt.registerTask 'compile:unit_tests', ['clean:unit_tests', 'coffee:unit_tests']
|
||||
grunt.registerTask 'test:unit', ['compile:app', 'compile:unit_tests', 'mochaTest:unit']
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
Path = require "path"
|
||||
|
||||
module.exports =
|
||||
# Options are passed to Sequelize.
|
||||
# See http://sequelizejs.com/documentation#usage-options for details
|
||||
mysql:
|
||||
clsi:
|
||||
database: "clsi"
|
||||
username: "clsi"
|
||||
password: null
|
||||
dialect: "sqlite"
|
||||
storage: Path.resolve(__dirname + "/../db.sqlite")
|
||||
|
||||
|
||||
path:
|
||||
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"
|
||||
|
||||
internal:
|
||||
clsi:
|
||||
port: 3013
|
||||
host: "localhost"
|
||||
|
||||
apis:
|
||||
clsi:
|
||||
url: "http://localhost:3013"
|
||||
|
|
@ -24,13 +24,13 @@
|
|||
"sinon": "~1.7.3",
|
||||
"grunt": "~0.4.2",
|
||||
"grunt-contrib-coffee": "~0.7.0",
|
||||
"grunt-contrib-watch": "~0.5.3",
|
||||
"grunt-concurrent": "~0.4.2",
|
||||
"grunt-nodemon": "~0.1.2",
|
||||
"grunt-contrib-clean": "~0.5.0",
|
||||
"grunt-shell": "~0.6.1",
|
||||
"grunt-mocha-test": "~0.8.1",
|
||||
"sandboxed-module": "~0.3.0",
|
||||
"timekeeper": "0.0.4"
|
||||
"timekeeper": "0.0.4",
|
||||
"grunt-execute": "^0.1.5",
|
||||
"bunyan": "^0.22.1",
|
||||
"grunt-bunyan": "^0.5.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ ChildProcess = require "child_process"
|
|||
|
||||
fixturePath = (path) -> __dirname + "/../fixtures/" + path
|
||||
|
||||
try
|
||||
fs.mkdirSync(fixturePath("tmp"))
|
||||
catch e
|
||||
|
||||
convertToPng = (pdfPath, pngPath, callback = (error) ->) ->
|
||||
convert = ChildProcess.exec "convert #{fixturePath(pdfPath)} #{fixturePath(pngPath)}"
|
||||
convert.on "exit", () ->
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
request = require "request"
|
||||
fs = require "fs"
|
||||
Settings = require "../../../../app/js/Settings"
|
||||
Settings = require "settings-sharelatex"
|
||||
|
||||
host = "localhost"
|
||||
|
||||
module.exports = Client =
|
||||
host: Settings.externalUrl
|
||||
host: Settings.apis.clsi.url
|
||||
|
||||
randomId: () ->
|
||||
Math.random().toString(16).slice(2)
|
||||
|
|
Loading…
Reference in a new issue