diff options
author | lassulus <lassulus@googlemail.com> | 2014-01-07 20:43:51 +0100 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2014-01-07 20:43:51 +0100 |
commit | 0e3431eefe44ca32d543312caa4081f8acc269b4 (patch) | |
tree | 89f058c8eaabde15e5b5b056e4739027da236d88 | |
parent | f8279b4cfa83073890b0d819d64b49b93e96ce6e (diff) | |
parent | 54664e857346e402cd1030cce52bffa6814d9334 (diff) |
Merge branch 'master' of github.com:krebscode/painload
-rwxr-xr-x | go/t/docker/docker_deploy.sh | 10 | ||||
-rw-r--r-- | go/t/docker/dockertest/deploy | 9 |
2 files changed, 9 insertions, 10 deletions
diff --git a/go/t/docker/docker_deploy.sh b/go/t/docker/docker_deploy.sh index 7ed0de58..1b4a433c 100755 --- a/go/t/docker/docker_deploy.sh +++ b/go/t/docker/docker_deploy.sh @@ -1,13 +1,13 @@ #!/bin/bash cd $(dirname $(readlink -f $0)) -set -euf +set -xeuf rnd_port=$(shuf -i 2000-65000 -n 1) docker_id=$(docker run -p $rnd_port:80 -d -v /krebs/go/t/docker/../../../:/krebs ubuntu /bin/bash /krebs/go/t/docker/dockertest/deploy) #docker run -p $rnd_port:80 -v /krebs/go/t/docker/../../../:/krebs ubuntu /bin/bash /krebs/go/t/docker/dockertest/deploy echo $docker_id on $rnd_port trap "docker stop $docker_id;docker rm $docker_id" INT TERM EXIT QUIT i=0 -max_wait=20 +max_wait=30 echo "waiting for install (takes about 3 minutes)" sleep 240 while ! curl -s localhost:$rnd_port >/dev/null ;do @@ -15,6 +15,6 @@ while ! curl -s localhost:$rnd_port >/dev/null ;do test $i -gt $max_wait && echo "timeout for installation reached, bailing out" && exit 1 echo "http port not yet reachable ($i of $max_wait). waiting" sleep 10 -done -short_uri=$(curl -F "uri=aids.balls" localhost:$rnd_port) -curl $short_uri -v | grep location: | grep aids.balls +done +short_uri=$(curl -F "uri=aids.balls" localhost:$rnd_port| sed 's/\r$//') +curl $short_uri -v 2>&1 | grep location: | grep aids.balls diff --git a/go/t/docker/dockertest/deploy b/go/t/docker/dockertest/deploy index f3c45277..399f469c 100644 --- a/go/t/docker/dockertest/deploy +++ b/go/t/docker/dockertest/deploy @@ -1,11 +1,10 @@ #!/bin/sh echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list apt-get update -sudo apt-get update -sudo apt-get install -y python-software-properties python g++ make -sudo add-apt-repository -y ppa:chris-lea/node.js -sudo apt-get update -sudo apt-get -y install nodejs redis-server +apt-get install -y python-software-properties python g++ make +add-apt-repository -y ppa:chris-lea/node.js +apt-get update +apt-get -y install nodejs redis-server npm config set registry http://registry.npmjs.org/ cd /krebs/go npm install |