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

iotest_test.go unit test failture #173

Open
gtchaos opened this issue Oct 14, 2019 · 0 comments
Open

iotest_test.go unit test failture #173

gtchaos opened this issue Oct 14, 2019 · 0 comments

Comments

@gtchaos
Copy link

gtchaos commented Oct 14, 2019

func TestTempFile(t *testing.T) {
f, cleanup := TempFile(t)
if _, err := f.Write([]byte("test")); err != nil {
t.Fatalf("temp file not writable: %v", err)
}
cleanup()
// Confirm closed
if err := f.Close(); err != syscall.EINVAL {
t.Errorf("temp file was not closed by cleanup func")
}


if call file.Close() again, it probably return error "file already closed" rather than "syscall.EINVAL"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant