diff --git a/test/app/dummy_test.sh b/test/app/dummy_test.sh index adfcebb9..0449bc49 100644 --- a/test/app/dummy_test.sh +++ b/test/app/dummy_test.sh @@ -30,9 +30,9 @@ echo "... testing query with abci-cli" RESPONSE=`abci-cli query \"$KEY\"` set +e -A=`echo $RESPONSE | grep 'log: exists'` +A=`echo $RESPONSE | grep "$VALUE"` if [[ $? != 0 ]]; then - echo "Failed to find 'log: exists' for $KEY. Response:" + echo "Failed to find $VALUE for $KEY. Response:" echo "$RESPONSE" exit 1 fi @@ -41,9 +41,9 @@ set -e # we should not be able to look up the value RESPONSE=`abci-cli query \"$VALUE\"` set +e -A=`echo $RESPONSE | grep 'log: exists'` +A=`echo $RESPONSE | grep $VALUE` if [[ $? == 0 ]]; then - echo "Found 'log: exists' for $VALUE when we should not have. Response:" + echo "Found '$VALUE' for $VALUE when we should not have. Response:" echo "$RESPONSE" exit 1 fi diff --git a/test/docker/Dockerfile b/test/docker/Dockerfile index 389158e5..829f5e45 100644 --- a/test/docker/Dockerfile +++ b/test/docker/Dockerfile @@ -10,10 +10,6 @@ RUN apt-get update && \ ENV REPO $GOPATH/src/github.com/tendermint/tendermint WORKDIR $REPO -# Install the apps -ADD scripts/install_abci_apps.sh install_abci_apps.sh -RUN bash install_abci_apps.sh - # Install the vendored dependencies before copying code # docker caching prevents reinstall on code change! ADD glide.yaml glide.yaml @@ -21,6 +17,10 @@ ADD glide.lock glide.lock ADD Makefile Makefile RUN make get_vendor_deps +# Install the apps +ADD scripts scripts +RUN bash scripts/install_abci_apps.sh + # Now copy in the code COPY . $REPO diff --git a/test/run_test.sh b/test/run_test.sh index fcc82d98..b505126e 100644 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -6,12 +6,13 @@ pwd BRANCH=$(git rev-parse --abbrev-ref HEAD) echo "Current branch: $BRANCH" +# run the go unit tests with coverage bash test/test_cover.sh -# run the app tests +# run the app tests using bash bash test/app/test.sh -# run the persistence test +# run the persistence tests using bash bash test/persist/test.sh if [[ "$BRANCH" == "master" || $(echo "$BRANCH" | grep "release-") != "" ]]; then diff --git a/test/test.sh b/test/test.sh index 1c1faca2..2e164fb3 100644 --- a/test/test.sh +++ b/test/test.sh @@ -12,18 +12,25 @@ echo "* [$(date +"%T")] cleaning up $LOGS_DIR" rm -rf "$LOGS_DIR" mkdir -p "$LOGS_DIR" +set +e +echo +echo "* [$(date +"%T")] removing run_test container" +docker rm -vf run_test +set -e + set +u if [[ "$CIRCLECI" == true ]]; then - set -u echo echo "* [$(date +"%T")] starting rsyslog container" docker rm -f rsyslog || true docker run -d -v "$LOGS_DIR:/var/log/" -p 127.0.0.1:5514:514/udp --name rsyslog voxxit/rsyslog fi -echo -echo "* [$(date +"%T")] building docker image" -bash "$DIR/docker/build.sh" +if [[ "$SKIP_BUILD" == "" ]]; then + echo + echo "* [$(date +"%T")] building docker image" + bash "$DIR/docker/build.sh" +fi echo echo "* [$(date +"%T")] running go tests and app tests in docker container"