google / uuid

Go package for UUIDs based on RFC 4122 and DCE 1.1: Authentication and Security Services.
BSD 3-Clause "New" or "Revised" License
5.26k stars 362 forks source link

Test failures (TestNode, TestNodeID) #31

Closed onlyjob closed 5 years ago

onlyjob commented 6 years ago

I'm getting the following test failures with Golang 1.10:

=== RUN   TestNode
--- FAIL: TestNode (0.00s)
        uuid_test.go:306: NodeInterface returned an empty string
=== RUN   TestNodeID
--- FAIL: TestNodeID (0.00s)
        uuid_test.go:376: NodeInterface "user" after SetInteface
fedir commented 6 years ago

All works for me.

$ go version
go version go1.10.3 darwin/amd64
$ go test
PASS
ok      github.com/google/uuid  0.011s
darkfeline commented 6 years ago

These tests fail if the running environment doesn't have any network interfaces (e.g., container, VM).

darkfeline commented 6 years ago

On Linux, you can simulate this with:

sudo ip netns add tmp
sudo ip netns exec tmp go test ./...
pborman commented 6 years ago

I expect darkfeline's change to be incorporated into v1.1 which might not be that far out.

pborman commented 5 years ago

Closing this as V1.1 has the changes.

carlwgeorge commented 5 years ago

@pborman #34 has not been merged yet, and v1.1.0 does not have the change. Did you mean a different tag?

pborman commented 5 years ago

Hmm, let me take a look.

pborman commented 5 years ago

Okay, I just published v1.1.1 with darkfeline's fixes. Tested on Linux with suggest code snippets above.