[localnet] Add rosetta-cli to Dockerfile

* Add fail messages to rpc & rosetta tests
rosetta
Daniel Van Der Maden 4 years ago
parent d3777dd497
commit 9c08802df1
No known key found for this signature in database
GPG Key ID: AEA215877D53EE19
  1. 10
      localnet/Dockerfile
  2. 6
      localnet/scripts/run.sh

@ -15,14 +15,18 @@ RUN git clone https://github.com/harmony-one/harmony.git \
RUN cd harmony && go get github.com/pborman/uuid && go get github.com/rjeczalik/notify \
&& go get github.com/cespare/cp && go get github.com/libp2p/go-libp2p-crypto && go get github.com/kr/pretty \
&& go get github.com/kr/text && go get gopkg.in/check.v1 && bash scripts/install_build_tools.sh && make
RUN rm -rf harmony
# Install testing tools
WORKDIR $GOPATH/src/github.com/harmony-one/harmony-tests/localnet
RUN curl -L -o /go/bin/hmy https://harmony.one/hmycli && chmod +x /go/bin/hmy
WORKDIR $GOPATH/src/github.com/coinbase
RUN git clone https://github.com/coinbase/rosetta-cli.git
RUN cd rosetta-cli && make install
WORKDIR $GOPATH/src/github.com/harmony-one/harmony-tests/localnet
COPY scripts scripts
COPY rpc_tests rpc_tests
COPY configs configs

@ -73,6 +73,9 @@ function rpc_tests() {
# Use 4 or less threads, high thread count can lead to burst RPC calls, which can lead to some RPC calls being rejected.
cd "$DIR/../" && python3 -u -m py.test -v -r s -s rpc_tests -x -n 4 || error=1
echo -e "\n=== \e[38;5;0;48;5;255mFINISHED RPC TESTS\e[0m ===\n"
if ((error == 1)); then
echo "FAILED RPC TESTS"
fi
}
function rosetta_tests() {
@ -89,6 +92,9 @@ function rosetta_tests() {
rosetta-cli check:construction --configuration-file "$DIR/../configs/localnet_rosetta_test_s1.json" || error=1
rosetta-cli check:data --configuration-file "$DIR/../configs/localnet_rosetta_test_s1.json" || error=1
echo -e "\n=== \e[38;5;0;48;5;255mFINISHED ROSETTA API TESTS\e[0m ===\n"
if ((error == 1)); then
echo "FAILED ROSETTA TESTS"
fi
}
function wait_for_localnet_boot() {

Loading…
Cancel
Save