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] add more flags to execute unit test by go test #1287

Closed
allencloud opened this issue May 9, 2018 · 1 comment
Closed

[test] add more flags to execute unit test by go test #1287

allencloud opened this issue May 9, 2018 · 1 comment
Assignees

Comments

@allencloud
Copy link
Collaborator

Ⅰ. Issue Description

I think we should add more flags to pouch's unit test. Here is the test code

function unit-test()
{
    cd $BUILDPATH/src/github.com/alibaba/pouch
    go test -i
    for d in `go list ./... | grep -v 'github.com/alibaba/pouch/test' | grep -v 'github.com/alibaba/pouch/extra' | grep -v 'github.com/alibaba/pouch/vendor' `
    do
        go test -coverprofile=profile.out -covermode=atomic $d
        if [ -f profile.out ] ; then
            cat profile.out >> coverage.txt
            rm profile.out >/dev/null 2>&1
        fi
    done
}

In the code, we have found that we use go test -coverprofile=profile.out -covermode=atomic $d to make it.

While I am afraid more flags should be added into the go test, for example --race to detect code which may be potential race.

I think this will guarantee more about the quality of Pouch.

Ⅱ. Describe what happened

NO more test flag in unit test.

Ⅲ. Describe what you expected to happen

more test flag in unit test.

@allencloud
Copy link
Collaborator Author

Do we need to support more test flags here, and I think we already added --race. But I still think we need more input from Golang experts and test experts, like @fuweid @shaloulcy @Letty5411 @chuanchang @sunyuan3 😄

@rudyfly rudyfly closed this as completed Jul 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants