Skip to content
This repository has been archived by the owner on Nov 9, 2020. It is now read-only.

[Part 1 - test coverage report] showing individual coverage for go tests #823

Merged

Conversation

shuklanirdesh82
Copy link
Contributor

@shuklanirdesh82 shuklanirdesh82 commented Dec 14, 2016

Adding go coverage for go tests. WIP for #404 and this PR is to share an idea how coverage data looks like for go tests while using go coverage tool.

some interesting log snip from the local run.

=> Running target testasroot Wed Dec 14 22:04:25 UTC 2016

GO15VENDOREXPERIMENT=1 go test github.com/vmware/docker-volume-vsphere/vmdk_plugin/vmdkops -cover
ok  	github.com/vmware/docker-volume-vsphere/vmdk_plugin/vmdkops	1.538s	coverage: 47.3% of statements
GO15VENDOREXPERIMENT=1 go test github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/config -cover
ok  	github.com/vmware/docker-volume-vsphere/vmdk_plugin/utils/config	0.009s	coverage: 64.3% of statements
make: Leaving directory `/go/src/github.com/vmware/docker-volume-vsphere/vmdk_plugin'

individual tests data

--- PASS: TestCommands (0.84s)
	cmd_test.go:30: 
		Creating Test Volume with name = [DockerTestVol]...
PASS
coverage: 46.7% of statements
:::::::::::::::
:::::::::::::::
--- PASS: TestSanity (158.79s)
	sanity_test.go:189: Successfully connected to tcp://10.20.105.77:2375
	sanity_test.go:189: Successfully connected to tcp://10.20.105.89:2375
	sanity_test.go:195: Creating vol=DefaultTestVol on client tcp://10.20.105.77:2375.
	sanity_test.go:89: Running cmd=&[touch /mnt/testvol/DefaultTestVol/file_to_touch] with vol=DefaultTestVol on client tcp://10.20.105.77:2375
	sanity_test.go:89: Running cmd=&[stat /mnt/testvol/DefaultTestVol/file_to_touch] with vol=DefaultTestVol on client tcp://10.20.105.77:2375
PASS
coverage: 12.5% of statements

@kerneltime kerneltime merged commit 554b6fa into vmware-archive:master Dec 19, 2016
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants