diff --git a/README_maintainers.md b/README_maintainers.md index 671d725abe..33a0376fe6 100644 --- a/README_maintainers.md +++ b/README_maintainers.md @@ -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 ------------------------- diff --git a/js/common/modules/org/arangodb/foxx/manager-utils.js b/js/common/modules/org/arangodb/foxx/manager-utils.js index 394190f307..0d15ed27c8 100644 --- a/js/common/modules/org/arangodb/foxx/manager-utils.js +++ b/js/common/modules/org/arangodb/foxx/manager-utils.js @@ -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'; } ////////////////////////////////////////////////////////////////////////////////