From 1b8f4bff2f2f8e14a33935530d50dbe88ed1c086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Fern=C3=A1ndez=20Capel?= Date: Thu, 12 Apr 2018 11:45:48 +0100 Subject: [PATCH] Ensure dump folder exists before running LinkedFiles tests The folder is also created in another test, so it will work the second time the tests are executed, but it fails the first time. --- .../web/test/acceptance/coffee/LinkedFilesTests.coffee | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/services/web/test/acceptance/coffee/LinkedFilesTests.coffee b/services/web/test/acceptance/coffee/LinkedFilesTests.coffee index 77af535eb5..9ca7ecae42 100644 --- a/services/web/test/acceptance/coffee/LinkedFilesTests.coffee +++ b/services/web/test/acceptance/coffee/LinkedFilesTests.coffee @@ -1,7 +1,9 @@ async = require "async" expect = require("chai").expect _ = require 'underscore' +mkdirp = require "mkdirp" +Settings = require "settings-sharelatex" MockFileStoreApi = require './helpers/MockFileStoreApi' request = require "./helpers/request" User = require "./helpers/User" @@ -21,8 +23,9 @@ describe "LinkedFiles", -> before (done) -> LinkedUrlProxy.listen 6543, (error) => return done(error) if error? - @owner = new User() - @owner.login done + @owner = new User() + @owner.login -> + mkdirp Settings.path.dumpFolder, done describe "creating a URL based linked file", -> before (done) -> @@ -181,4 +184,4 @@ describe "LinkedFiles", -> done() # TODO: Add test for asking for host that return ENOTFOUND - # (This will probably end up handled by the proxy) \ No newline at end of file + # (This will probably end up handled by the proxy)