prysm-pulse/scripts/update-mockgen.sh
terence tsao 9ab08e6998
Remove beacon rpc service (#3515)
* first version of the watchtower api

* first version

* delete watchtower

* move to message loop

* roughtime

* one time

* fix test

* Fixed test

* Fixed proposer server

* Gaz

* gaz

* Stuck

* Tests passing

* Fixed all the tests
2019-09-18 06:34:50 -07:00

18 lines
916 B
Bash
Executable File

#!/bin/bash
# Script to update mock files after proto/beacon/rpc/v1/services.proto changes.
# Use a space to separate mock destination from its interfaces.
mocks=(
"./beacon-chain/internal/validator_service_mock.go ValidatorServiceServer,ValidatorService_WaitForActivationServer,ValidatorService_WaitForChainStartServer"
"./validator/internal/attester_service_mock.go AttesterServiceClient"
"./validator/internal/proposer_service_mock.go ProposerServiceClient"
"./validator/internal/validator_service_mock.go ValidatorServiceClient,ValidatorService_WaitForActivationClient,ValidatorService_WaitForChainStartClient")
for ((i = 0; i < ${#mocks[@]}; i++)); do
file=${mocks[i]% *};
interfaces=${mocks[i]#* };
echo "generating $file for interfaces: $interfaces";
mockgen -package=internal -destination=$file github.com/prysmaticlabs/prysm/proto/beacon/rpc/v1 $interfaces
done