-
Notifications
You must be signed in to change notification settings - Fork 154
Conversation
@@ -85,6 +85,11 @@ test-all: | |||
@echo Running all tests | |||
$(GO) test -mod=vendor -race -v -tags 'unit e2e' $(GO_PACKAGES) | |||
|
|||
.PHONY: coverage | |||
coverage: | |||
$(GO) test -mod=vendor -race -tags unit -coverprofile=coverage.txt ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's fine to only use unit test coverage as it should be the same as the e2e
one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add both tags to the coverage, as there are things that we are only testing in e2e
(the client creation and connection for example)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The issue with also running the e2e test is that they (have to) run in docker. Which makes it a bit hard to extract the coverage report. Would you be fine just running the unit tests for now and I open a ticket for the e2e tests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that is a good idea, opening another ticket to refine it later.
You can see the report at https://codecov.io/gh/mattermost/mmctl/branch/mmctl |
@@ -85,6 +85,11 @@ test-all: | |||
@echo Running all tests | |||
$(GO) test -mod=vendor -race -v -tags 'unit e2e' $(GO_PACKAGES) | |||
|
|||
.PHONY: coverage | |||
coverage: | |||
$(GO) test -mod=vendor -race -tags unit -coverprofile=coverage.txt ./... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would add both tags to the coverage, as there are things that we are only testing in e2e
(the client creation and connection for example)
Codecov Report
@@ Coverage Diff @@
## master #131 +/- ##
=========================================
Coverage ? 60.13%
=========================================
Files ? 26
Lines ? 1999
Branches ? 0
=========================================
Hits ? 1202
Misses ? 760
Partials ? 37 Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some things to be addressed, mainly raised by @mgdelacroix, but otherwise looks good to me.
Co-Authored-By: Miguel de la Cruz <miguel@mcrx.me>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for working on this!!
I forgot to add a badge. Will do later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
Summary
Ticket Link