Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Test code for validator active status check #20

Merged
merged 2 commits into from
Oct 26, 2022
Merged

Conversation

heejin-github
Copy link
Member

  • change package name to rpc for health
  • Add Test code for validator active status check

@heejin-github
Copy link
Member Author

# 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%

@heejin-github heejin-github merged commit 9b6b357 into main Oct 26, 2022
@heejin-github heejin-github deleted the test_status branch October 26, 2022 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant