thrift/test/go/genmock.sh
D. Can Celasun e0e1a088d6 THRIFT-4855: Pin golang/mock to 1.2.0
The latest version (1.3.0) requires us to switch to Go modules for our
tests, but that's not trivial given our directory structure.

For now, just fix the CI issues by pinning the version.
2019-05-10 21:08:07 +02:00

16 lines
418 B
Bash

#!/bin/sh
set -e
export GOPATH=`pwd`
export GOBIN=`pwd`/bin
export GO111MODULE=off
mkdir -p src/github.com/golang/mock
cd src/github.com/golang
curl -fsSL https://github.com/golang/mock/archive/v1.2.0.tar.gz -o mock.tar.gz
tar -xzvf mock.tar.gz -C mock --strip-components=1
cd mock/mockgen
go install .
cd ../../../../../
bin/mockgen -destination=src/common/mock_handler.go -package=common gen/thrifttest ThriftTest