Skip to content

Commit 5d5e50c

Browse files
kolyshkinianlancetaylor
authored andcommitted
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 <[email protected]> TryBot-Result: Go Bot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Tobias Klauser <[email protected]>
1 parent 5d0c284 commit 5d5e50c

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

src/os/user/lookup_plan9.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ const (
1818
)
1919

2020
func init() {
21+
userImplemented = false
2122
groupImplemented = false
2223
}
2324

src/os/user/user_test.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ func compare(t *testing.T, want, got *User) {
5656
func TestLookup(t *testing.T) {
5757
checkUser(t)
5858

59-
if runtime.GOOS == "plan9" {
60-
t.Skipf("Lookup not implemented on %q", runtime.GOOS)
61-
}
62-
6359
want, err := Current()
6460
if err != nil {
6561
t.Fatalf("Current: %v", err)
@@ -77,10 +73,6 @@ func TestLookup(t *testing.T) {
7773
func TestLookupId(t *testing.T) {
7874
checkUser(t)
7975

80-
if runtime.GOOS == "plan9" {
81-
t.Skipf("LookupId not implemented on %q", runtime.GOOS)
82-
}
83-
8476
want, err := Current()
8577
if err != nil {
8678
t.Fatalf("Current: %v", err)

0 commit comments

Comments
 (0)