[test] Add rosetta.sh & change api.sh to rpc.sh

* Update Makefile for new tests

Signed-off-by: Daniel Van Der Maden <dvandermaden0@berkeley.edu>
pull/3404/head
Daniel Van Der Maden 4 years ago
parent c0335c27b4
commit 28a72f4aee
No known key found for this signature in database
GPG Key ID: AEA215877D53EE19
  1. 20
      Makefile
  2. 4
      test/all.sh
  3. 4
      test/rosetta.sh
  4. 29
      test/rpc.sh

@ -29,8 +29,10 @@ help:
@echo "distclean - remove node files & logs created by localnet, and all libs" @echo "distclean - remove node files & logs created by localnet, and all libs"
@echo "test - run the entire test suite (go test & Node API test)" @echo "test - run the entire test suite (go test & Node API test)"
@echo "test-go - run the go test (with go lint, fmt, imports, mod, and generate checks)" @echo "test-go - run the go test (with go lint, fmt, imports, mod, and generate checks)"
@echo "test-api - run the Node API test" @echo "test-rpc - run the rpc tests"
@echo "test-api-attach - attach onto the Node API testing docker container for inspection" @echo "test-rpc-attach - attach onto the rpc testing docker container for inspection"
@echo "test-rosetta - run the rosetta tests"
@echo "test-rosetta-attach - attach onto the rosetta testing docker container for inspection"
@echo "linux_static - static build the harmony binary & bootnode along with the MCL & BLS libs (for linux)" @echo "linux_static - static build the harmony binary & bootnode along with the MCL & BLS libs (for linux)"
@echo "arm_static - static build the harmony binary & bootnode on ARM64 platform" @echo "arm_static - static build the harmony binary & bootnode on ARM64 platform"
@echo "rpm - build a harmony RPM pacakge" @echo "rpm - build a harmony RPM pacakge"
@ -82,11 +84,17 @@ test:
test-go: test-go:
bash ./test/go.sh bash ./test/go.sh
test-api: test-rpc:
bash ./test/api.sh run bash ./test/rpc.sh run
test-api-attach: test-rpc-attach:
bash ./test/api.sh attach bash ./test/rpc.sh attach
test-rosetta:
bash ./test/rosetta.sh run
test-rosetta-attach:
bash ./test/rosetta.sh attach
linux_static: linux_static:
make -C $(TOP)/mcl -j8 make -C $(TOP)/mcl -j8

@ -2,4 +2,6 @@
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)" DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
bash "$DIR/kill_node.sh" bash "$DIR/kill_node.sh"
docker pull harmonyone/localnet-test docker pull harmonyone/localnet-test
docker run -it --expose 9000-9999 -v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test docker run -it \
-p 9500:9500 -p 9501:9501 -p 9599:9599 -p 9598:9598 -p 9799:9799 -p 9798:9798 -p 9899:9899 -p 9898:9898 \
-v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test

@ -8,7 +8,9 @@ case ${1} in
run) run)
docker pull harmonyone/localnet-test docker pull harmonyone/localnet-test
docker rm "$docker_name" docker rm "$docker_name"
docker run -it --name "$docker_name" --expose 9000-9999 -v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test -n -k docker run -it --name "$docker_name" \
-p 9500:9500 -p 9501:9501 -p 9599:9599 -p 9598:9598 -p 9799:9799 -p 9798:9798 -p 9899:9899 -p 9898:9898 \
-v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test -r -k
;; ;;
attach) attach)
docker exec -it "$docker_name" /bin/bash docker exec -it "$docker_name" /bin/bash

@ -0,0 +1,29 @@
#!/usr/bin/env bash
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
bash "$DIR/kill_node.sh"
docker_name="harmony-localnet-test"
case ${1} in
run)
docker pull harmonyone/localnet-test
docker rm "$docker_name"
docker run -it --name "$docker_name" \
-p 9500:9500 -p 9501:9501 -p 9599:9599 -p 9598:9598 -p 9799:9799 -p 9798:9798 -p 9899:9899 -p 9898:9898 \
-v "$DIR/../:/go/src/github.com/harmony-one/harmony" harmonyone/localnet-test -n -k
;;
attach)
docker exec -it "$docker_name" /bin/bash
;;
*)
echo "
Node API tests
Param: Help:
run Run the Node API tests
attach Attach onto the Node API testing docker image for inspection
"
exit 0
;;
esac
Loading…
Cancel
Save