Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

TestSha1Sum should not fail if file open successful #28

Open
demizer opened this issue Aug 8, 2015 · 0 comments
Open

TestSha1Sum should not fail if file open successful #28

demizer opened this issue Aug 8, 2015 · 0 comments
Labels

Comments

@demizer
Copy link
Owner

demizer commented Aug 8, 2015

func TestSha1Sum(t *testing.T) {
    _, err := sha1sum("/root")
    if err == nil {
        t.Error("EXPECT: error permission denied GOT: No errors")
    }
}

Root user can read "/root", so this test will fail if being run by root user. This test should not fail if being run by a privileged user.

@demizer demizer added the Minor label Aug 8, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant