Skip to content

Commit

Permalink
Merge pull request certbot#780 from letsencrypt/integration
Browse files Browse the repository at this point in the history
Make boulder-start.sh more robust & helpful
  • Loading branch information
jdkasten committed Sep 23, 2015
2 parents 2e13066 + 740f516 commit 5cc9061
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions tests/boulder-start.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
#!/bin/sh -xe
#!/bin/bash
# Download and run Boulder instance for integration testing


# ugh, go version output is like:
# go version go1.4.2 linux/amd64
GOVER=`go version | cut -d" " -f3 | cut -do -f2`

# version comparison
function verlte {
[ "$1" = "`echo -e "$1\n$2" | sort -V | head -n1`" ]
}

if ! verlte 1.5 "$GOVER" ; then
echo "We require go version 1.5 or later; you have... $GOVER"
exit 1
fi

set -xe

export GOPATH="${GOPATH:-/tmp/go}"
export PATH="$GOPATH/bin:$PATH"

Expand All @@ -9,7 +26,11 @@ export PATH="$GOPATH/bin:$PATH"
go get -d github.com/letsencrypt/boulder/...
cd $GOPATH/src/github.com/letsencrypt/boulder
# goose is needed for ./test/create_db.sh
go get bitbucket.org/liamstask/goose/cmd/goose
if ! go get bitbucket.org/liamstask/goose/cmd/goose ; then
echo Problems installing goose... perhaps rm -rf \$GOPATH \("$GOPATH"\)
echo and try again...
exit 1
fi
./test/create_db.sh
./start.py &
# Hopefully start.py bootstraps before integration test is started...

0 comments on commit 5cc9061

Please sign in to comment.