Browse Source

fix integration tests (Fixes #131)

pull/1780/head
Anton Kaliaev 7 years ago
parent
commit
1d49453ffb
No known key found for this signature in database GPG Key ID: 7B6881D965918214
4 changed files with 6 additions and 6 deletions
  1. +3
    -3
      Makefile
  2. +1
    -1
      tests/test_app/app.go
  3. +1
    -1
      tests/test_app/test.sh
  4. +1
    -1
      tests/test_cli/test.sh

+ 3
- 3
Makefile View File

@ -5,7 +5,7 @@ GOTOOLS = \
all: protoc install test all: protoc install test
NOVENDOR = go list github.com/tendermint/abci/... | grep -v /vendor/
PACKAGES=$(shell go list ./... | grep -v '/vendor/')
install-protoc: install-protoc:
# Download: https://github.com/google/protobuf/releases # Download: https://github.com/google/protobuf/releases
@ -27,7 +27,7 @@ dist:
# test.sh requires that we run the installed cmds, must not be out of date # test.sh requires that we run the installed cmds, must not be out of date
test: install test: install
find . -path ./vendor -prune -o -name *.sock -exec rm {} \; find . -path ./vendor -prune -o -name *.sock -exec rm {} \;
@ go test -p 1 `${NOVENDOR}`
@ go test $(PACKAGES)
@ bash tests/test.sh @ bash tests/test.sh
fmt: fmt:
@ -36,7 +36,7 @@ fmt:
test_integrations: get_vendor_deps install test test_integrations: get_vendor_deps install test
get_deps: get_deps:
@ go get -d `${NOVENDOR}`
@ go get -d $(PACKAGES)
tools: tools:
go get -u -v $(GOTOOLS) go get -u -v $(GOTOOLS)


+ 1
- 1
tests/test_app/app.go View File

@ -18,7 +18,7 @@ func startApp(abciApp string) *process.Process {
proc, err := process.StartProcess("abci_app", proc, err := process.StartProcess("abci_app",
"", "",
"bash", "bash",
[]string{"-c", abciApp},
[]string{"-c", fmt.Sprintf("abci-cli %s", abciApp)},
nil, nil,
os.Stdout, os.Stdout,
) )


+ 1
- 1
tests/test_app/test.sh View File

@ -15,7 +15,7 @@ cd "$DIR"
ABCI_APP="counter" go run ./*.go ABCI_APP="counter" go run ./*.go
# test golang counter via grpc # test golang counter via grpc
ABCI_APP="counter -abci=grpc" ABCI="grpc" go run ./*.go
ABCI_APP="counter --abci=grpc" ABCI="grpc" go run ./*.go
# test nodejs counter # test nodejs counter
# TODO: fix node app # TODO: fix node app


+ 1
- 1
tests/test_cli/test.sh View File

@ -17,7 +17,7 @@ function testExample() {
$APP &> /dev/null & $APP &> /dev/null &
sleep 2 sleep 2
abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new" abci-cli --verbose batch < "$INPUT" > "${INPUT}.out.new"
killall $3
killall "$3"
pre=$(shasum < "${INPUT}.out") pre=$(shasum < "${INPUT}.out")
post=$(shasum < "${INPUT}.out.new") post=$(shasum < "${INPUT}.out.new")


Loading…
Cancel
Save