From: Kir Kolyshkin Date: Wed, 23 Jun 2021 03:19:57 +0000 (-0700) Subject: os/user: simplify test skip for plan9 X-Git-Tag: go1.18beta1~1677 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=5d5e50c3db;p=gostls13.git os/user: simplify test skip for plan9 There's no need to specifically check for runtime.GOOS as there's already a generic mechanism for that. Change-Id: I7125443ead456548bd503c5e71cd56e9eb30b446 Reviewed-on: https://go-review.googlesource.com/c/go/+/330750 Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot Reviewed-by: Ian Lance Taylor Reviewed-by: Tobias Klauser --- diff --git a/src/os/user/lookup_plan9.go b/src/os/user/lookup_plan9.go index 33ae3a6adf..51caf55935 100644 --- a/src/os/user/lookup_plan9.go +++ b/src/os/user/lookup_plan9.go @@ -18,6 +18,7 @@ const ( ) func init() { + userImplemented = false groupImplemented = false } diff --git a/src/os/user/user_test.go b/src/os/user/user_test.go index 49920317be..1112c78c00 100644 --- a/src/os/user/user_test.go +++ b/src/os/user/user_test.go @@ -56,10 +56,6 @@ func compare(t *testing.T, want, got *User) { func TestLookup(t *testing.T) { checkUser(t) - if runtime.GOOS == "plan9" { - t.Skipf("Lookup not implemented on %q", runtime.GOOS) - } - want, err := Current() if err != nil { t.Fatalf("Current: %v", err) @@ -77,10 +73,6 @@ func TestLookup(t *testing.T) { func TestLookupId(t *testing.T) { checkUser(t) - if runtime.GOOS == "plan9" { - t.Skipf("LookupId not implemented on %q", runtime.GOOS) - } - want, err := Current() if err != nil { t.Fatalf("Current: %v", err)