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

test: increase test coverage for model critical section (>80%) #146

Merged
merged 1 commit into from
Jun 17, 2022

Conversation

noandrea
Copy link
Contributor

➜ go test -tags test -coverprofile=/tmp/c.out . && grep -v .pb. /tmp/c.out > /tmp/coverage.out && go tool cover -html=/tmp/coverage.out -o=/tmp/coverage.html && goverreport -coverprofile=/tmp/coverage.out -sort stmt
ok  	github.com/elesto-dao/elesto/x/credential	0.031s	coverage: 2.6% of statements
+-------------------------------------------------------------+--------+---------+-------+---------+---------------+--------------+
|                            File                             | Blocks | Missing | Stmts | Missing | Block cover % | Stmt cover % |
+-------------------------------------------------------------+--------+---------+-------+---------+---------------+--------------+
| github.com/elesto-dao/elesto/x/credential/codec.go          |      2 |       2 |     2 |       2 |          0.00 |         0.00 |
| github.com/elesto-dao/elesto/x/credential/event.go          |      3 |       3 |     3 |       3 |          0.00 |         0.00 |
| github.com/elesto-dao/elesto/x/credential/msg.go            |     21 |      21 |    27 |      27 |          0.00 |         0.00 |
| github.com/elesto-dao/elesto/x/credential/credential.go     |     54 |       9 |    73 |       9 |         83.33 |        87.67 | <
| github.com/elesto-dao/elesto/x/credential/helpers.go        |      6 |       0 |     9 |       0 |        100.00 |       100.00 | <
| github.com/elesto-dao/elesto/x/credential/msg_validation.go |     21 |       0 |    21 |       0 |        100.00 |       100.00 | <
+-------------------------------------------------------------+--------+---------+-------+---------+---------------+--------------+
|                                                       Total |    107 |      35 |   135 |      41 |         67.29 |        69.63 |
+-------------------------------------------------------------+--------+---------+-------+---------+---------------+--------------+

@noandrea noandrea requested a review from a team as a code owner June 16, 2022 16:57
@noandrea noandrea added the cascading A PR that is targeting another branch that is not main label Jun 16, 2022
Copy link
Contributor

@PaddyMc PaddyMc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙇

@noandrea noandrea merged commit 0f3a29c into test/credential Jun 17, 2022
@noandrea noandrea deleted the test/credential-model branch June 17, 2022 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cascading A PR that is targeting another branch that is not main
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants