mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #665 from unihorn/52
feat(test): check format conditions in test
This commit is contained in:
commit
41ad9ebb48
6
build
6
build
@ -7,6 +7,12 @@ fi
|
|||||||
|
|
||||||
export GOBIN=${PWD}/bin
|
export GOBIN=${PWD}/bin
|
||||||
export GOPATH=${PWD}
|
export GOPATH=${PWD}
|
||||||
|
export GOFMTPATH="./bench ./config ./discovery ./error etcd.go ./http ./log ./machines ./metrics ./mod profile.go ./server ./store ./tests"
|
||||||
|
|
||||||
|
# Don't surprise user by formatting their codes by stealth
|
||||||
|
if [ "$1" == "--fmt" ]; then
|
||||||
|
gofmt -s -w -l $GOFMTPATH
|
||||||
|
fi
|
||||||
|
|
||||||
go install github.com/coreos/etcd
|
go install github.com/coreos/etcd
|
||||||
go install github.com/coreos/etcd/bench
|
go install github.com/coreos/etcd/bench
|
||||||
|
7
test.sh
7
test.sh
@ -2,6 +2,13 @@
|
|||||||
|
|
||||||
. ./build
|
. ./build
|
||||||
|
|
||||||
|
fmtRes=`gofmt -l $GOFMTPATH`
|
||||||
|
if [ "$fmtRes" != "" ]; then
|
||||||
|
echo "Failed to pass golang format checking."
|
||||||
|
echo "Please gofmt modified go files, or run './build --fmt'."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
go test -i ./http
|
go test -i ./http
|
||||||
go test -v ./http
|
go test -v ./http
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user