diff --git a/scripts/repo.json b/scripts/repo.json new file mode 100644 index 0000000..7c64b18 --- /dev/null +++ b/scripts/repo.json @@ -0,0 +1,8 @@ + { + "catalogs": { + "library": { + "url": "/scratch", + "branch": "master" + } + } +} diff --git a/scripts/test b/scripts/test index 2ea821f..77a71aa 100755 --- a/scripts/test +++ b/scripts/test @@ -5,6 +5,12 @@ cd $(dirname $0)/.. trap "rm -rf /scratch/*" exit +GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) + +if [ "$GIT_BRANCH" != "master" ]; then + sed -i "s#master#$GIT_BRANCH#" ./scripts/repo.json +fi + if [ -d "/scratch" ]; then rsync -a --exclude .tox ./ /scratch fi @@ -12,7 +18,7 @@ fi pushd /scratch/integration # Start rancher-catalog-service and wait for it to start. -/usr/bin/rancher-catalog-service -catalogUrl ../ -refreshInterval 7200 > /dev/null 2>&1 & +/usr/bin/rancher-catalog-service -configFile ../scripts/repo.json -refreshInterval 7200 > /dev/null 2>&1 & sleep 10 tox -e flake8,py27 popd