go/src/os/user
Bryan C. Mills 9027e5d2b4 os/user: skip tests that invoke Current if it returns an expected error
Today Current may fail if the binary is not built with cgo
and USER and/or HOME is not set in the environment.
That should not cause the test to fail.

After this change,

	GOCACHE=$(go env GOCACHE) CGO_ENABLED=0 USER= HOME= go test os/user

now passes on linux/amd64.

For #59583.

Change-Id: Id290cd1088051e930d73f0dd554177124796e8f2
Reviewed-on: https://go-review.googlesource.com/c/go/+/487015
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Johan Brandhorst-Satzkorn <johan.brandhorst@gmail.com>
Auto-Submit: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-04-21 15:59:43 +00:00
..
cgo_listgroups_unix.go
cgo_lookup_cgo.go
cgo_lookup_syscall.go
cgo_lookup_unix.go
cgo_unix_test.go
cgo_user_test.go
getgrouplist_syscall.go
getgrouplist_unix.go
listgroups_stub.go
listgroups_unix.go
listgroups_unix_test.go
lookup.go
lookup_android.go
lookup_plan9.go
lookup_stubs.go
lookup_unix.go
lookup_unix_test.go
lookup_windows.go
user.go
user_test.go