test: fix docker and apps
This commit is contained in:
parent
0fa34f7f67
commit
e4e70ece3f
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
15
test/test.sh
15
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"
|
||||
|
|
Loading…
Reference in New Issue