1
0
Fork 0

Add way to fake the foxx github store structure for faster unittests.

This commit is contained in:
Willi Goesgens 2015-04-21 17:23:56 +02:00
parent d10e79c500
commit f7175f6652
2 changed files with 13 additions and 1 deletions

View File

@ -305,6 +305,14 @@ scripts/unittest is mostly only a wrapper; The backend functionality lives in:
**js/server/modules/org/arangodb/testing.js**
Running foxx tests with a fake foxx Repo
----------------------------------------
Since downloading fox apps from github can be cumbersome with shaky DSL
and DOS'ed github, we can fake it like this:
export FOXX_BASE_URL="http://germany/fakegit/"
./scripts/unittest single_server --test 'js/server/tests/shell-foxx-manager-spec.js'
arangod Emergency console
-------------------------

View File

@ -82,7 +82,11 @@ function buildGithubUrl (repository, version) {
version = "master";
}
return 'https://github.com/' + repository + '/archive/' + version + '.zip';
var urlPrefix = require("process").env.FOXX_BASE_URL;
if (urlPrefix === undefined) {
urlPrefix = 'https://github.com/';
}
return urlPrefix + repository + '/archive/' + version + '.zip';
}
////////////////////////////////////////////////////////////////////////////////