Skip to content

Commit

Permalink
Enable logs from all-in-one integration test (#1857)
Browse files Browse the repository at this point in the history
* Enable logs from all-in-one integration test

Signed-off-by: Yuri Shkuro <ys@uber.com>

* Bump Node to 10

Signed-off-by: Yuri Shkuro <ys@uber.com>
  • Loading branch information
yurishkuro authored Oct 13, 2019
1 parent 18a5d75 commit ab11c69
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ clean:
test: go-gen
bash -c "set -e; set -o pipefail; $(GOTEST) ./... | $(COLORIZE)"

.PHONY: integration-test
integration-test: go-gen
.PHONY: all-in-one-integration-test
all-in-one-integration-test: go-gen
$(GOTEST) -tags=integration ./cmd/all-in-one/...

.PHONY: storage-integration-test
Expand Down
7 changes: 5 additions & 2 deletions cmd/all-in-one/all_in_one_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,14 @@ func getSamplingStrategy(t *testing.T) {
}

func healthCheck() error {
for i := 0; i < 100; i++ {
println("Health-checking all-in-one...")
for i := 0; i < 10; i++ {
if _, err := http.Get(queryURL); err == nil {
println("Health-check successful")
return nil
}
time.Sleep(100 * time.Millisecond)
println("Health-check unsuccessful, waiting 1sec...")
time.Sleep(time.Second)
}
return fmt.Errorf("query service is not ready")
}
14 changes: 10 additions & 4 deletions scripts/travis/build-all-in-one-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,27 @@ set -e
BRANCH=${BRANCH:?'missing BRANCH env var'}

source ~/.nvm/nvm.sh
nvm use 8
make build-all-in-one-linux
nvm use 10
make build-ui

export REPO=jaegertracing/all-in-one
set -x

make build-all-in-one GOOS=linux

export REPO=jaegertracing/all-in-one
docker build -f cmd/all-in-one/Dockerfile -t $REPO:latest cmd/all-in-one
export CID=$(docker run -d -p 16686:16686 -p 5778:5778 $REPO:latest)
make integration-test

set +e
make all-in-one-integration-test

if [ $? -ne 0 ] ; then
echo "---- integration test failed unexpectedly ----"
echo "--- check the docker log below for details ---"
docker logs $CID
exit 1
fi
set -e

docker kill $CID

Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/install-ui-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
set -e

# Repo for newer Node.js versions
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -

curl -o- -L https://yarnpkg.com/install.sh | bash

source ~/.nvm/nvm.sh
nvm install 8
nvm install 10

yarn --version

0 comments on commit ab11c69

Please sign in to comment.