]> Cypherpunks repositories - gostls13.git/commitdiff
os/user: simplify test skip for plan9
authorKir Kolyshkin <kolyshkin@gmail.com>
Wed, 23 Jun 2021 03:19:57 +0000 (20:19 -0700)
committerIan Lance Taylor <iant@golang.org>
Sun, 22 Aug 2021 22:04:02 +0000 (22:04 +0000)
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 <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Tobias Klauser <tobias.klauser@gmail.com>
src/os/user/lookup_plan9.go
src/os/user/user_test.go

index 33ae3a6adf416c5d74523e5fba68b51c002e64c2..51caf55935e37eb6880521487f6ddf95695c5db3 100644 (file)
@@ -18,6 +18,7 @@ const (
 )
 
 func init() {
+       userImplemented = false
        groupImplemented = false
 }
 
index 49920317bed93b9c7c32baea3d4f809c2127f538..1112c78c004f92816c13645f6637fa9e2e96d1a3 100644 (file)
@@ -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)