add script to generate all network mocks (#129)

* add script to generate all network mocks

* Update scripts/genmocks.sh

Co-authored-by: Dan Laine <daniel.laine@avalabs.org>
This commit is contained in:
felipemadero
2022-04-21 15:05:15 -04:00
committed by GitHub
co-authored by Dan Laine
parent 63215abf1d
commit 1eb10123df
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -e
if ! [[ "$0" =~ scripts/genmocks.sh ]]; then
echo "must be run from repository root"
exit 255
fi
mockery --dir api --name Client --output api/mocks/ --filename client.go
mockery --dir api --name EthClient --output api/mocks/ --filename EthClient.go
mockery --dir local --name NodeProcess --output local/mocks/ --filename node_process.go
mockery --dir k8s --name dnsReachableChecker --output k8s/mocks/ --filename dns_checker.go --structname DnsReachableChecker
echo "Successfully generated mock files"