dsrvlabs / vatz-plugin-cosmoshub

Vatz plugin for cosmoshub
GNU General Public License v3.0
3 stars 2 forks source link

Add Test code for validator active status check #20

Closed heejin-github closed 2 years ago

heejin-github commented 2 years ago
heejin-github commented 2 years ago
# go test ./... -v
=== RUN   TestAPI
--- PASS: TestAPI (0.00s)
=== RUN   TestParse
--- PASS: TestParse (0.00s)
=== RUN   TestGetStatus
--- PASS: TestGetStatus (0.00s)
=== RUN   TestGetHealth
--- PASS: TestGetHealth (0.00s)
=== RUN   TestGetBondStatus
--- PASS: TestGetBondStatus (0.00s)
PASS
ok      github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos    (cached)
?       github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/mocks  [no test files]
go test -coverprofile cover.out
PASS
coverage: 54.4% of statements
ok      github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos    0.003s
go tool cover -func=cover.out
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/api.go:66:     GetStatus   70.6%
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/api.go:97:     parseRawStatus  80.0%
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/api.go:108:    NewClient   100.0%
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/health.go:8:   GetHealth   77.8%
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/net_info.go:83:    GetNpeers   0.0%
github.com/dsrvlabs/vatz-plugin-cosmoshub/rpc/cosmos/validators.go:54:  GetBondStatus   72.2%
total:                                  (statements)    54.4%