test: update testing script to install dependencies through dep
This commit is contained in:
parent
1dedc73a39
commit
8564da5723
12
gotest.sh
12
gotest.sh
@ -93,7 +93,7 @@ lint_check() {
|
|||||||
gometalinter.v1 --install 1>/dev/null
|
gometalinter.v1 --install 1>/dev/null
|
||||||
|
|
||||||
# Automatic checks
|
# Automatic checks
|
||||||
linter_targets=$(glide novendor | grep -v lnrpc)
|
linter_targets=$(go list -f '{{.Dir}}' ./... | grep -v lnrpc)
|
||||||
test -z "$(gometalinter.v1 --disable-all \
|
test -z "$(gometalinter.v1 --disable-all \
|
||||||
--enable=gofmt \
|
--enable=gofmt \
|
||||||
--enable=vet \
|
--enable=vet \
|
||||||
@ -134,17 +134,17 @@ while getopts "lrcio" flag; do
|
|||||||
# remove the options from the positional parameters
|
# remove the options from the positional parameters
|
||||||
shift $(( OPTIND - 1 ))
|
shift $(( OPTIND - 1 ))
|
||||||
|
|
||||||
# Make sure glide is installed and $GOPATH/bin is in your path.
|
# Make sure dep is installed and $GOPATH/bin is in your path.
|
||||||
if [ ! -x "$(type -p glide)" ]; then
|
if [ ! -x "$(type -p dep)" ]; then
|
||||||
print "* Install glide"
|
print "* Install dep"
|
||||||
go get -u github.com/Masterminds/glide
|
go get -u github.com/golang/dep/cmd/dep
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install the dependency if vendor directory not exist or if flag have been
|
# Install the dependency if vendor directory not exist or if flag have been
|
||||||
# specified.
|
# specified.
|
||||||
if [ "$NEED_INSTALL" == "true" ] || [ ! -d "./vendor" ]; then
|
if [ "$NEED_INSTALL" == "true" ] || [ ! -d "./vendor" ]; then
|
||||||
print "* Install dependencies"
|
print "* Install dependencies"
|
||||||
glide install
|
dep ensure
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Required for the integration tests
|
# Required for the integration tests
|
||||||
|
Loading…
Reference in New Issue
Block a user