diff --git a/go.mod b/go.mod index 84fffb6..83b7737 100644 --- a/go.mod +++ b/go.mod @@ -20,13 +20,13 @@ require ( github.com/multiformats/go-multibase v0.0.1 github.com/onsi/ginkgo v1.8.0 // indirect github.com/onsi/gomega v1.5.0 // indirect - github.com/pions/datachannel v1.2.1 + github.com/pions/datachannel v1.2.2-0.20190402055840-9276b506f1f3 github.com/pions/quic-go v0.10.2 // indirect - github.com/pions/webrtc v1.2.1-0.20190401190041-d906c2b43b07 + github.com/pions/webrtc v1.2.1-0.20190402062217-69e5725007d2 github.com/whyrusleeping/go-logging v0.0.0-20170515211332-0457bb6b88fc github.com/whyrusleeping/go-smux-multiplex v3.0.16+incompatible golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c // indirect golang.org/x/net v0.0.0-20190328230028-74de082e2cca // indirect - golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65 // indirect + golang.org/x/sys v0.0.0-20190402054613-e4093980e83e // indirect gopkg.in/yaml.v2 v2.2.2 // indirect ) diff --git a/go.sum b/go.sum index 1f9e30a..02ea5f5 100644 --- a/go.sum +++ b/go.sum @@ -199,8 +199,8 @@ github.com/onsi/gomega v1.5.0 h1:izbySO9zDPmjJ8rDjLvkA2zJHIo+HkYXHnf7eN7SSyo= github.com/onsi/gomega v1.5.0/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/opentracing/opentracing-go v1.0.2 h1:3jA2P6O1F9UOrWVpwrIo17pu01KWvNWg4X946/Y5Zwg= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= -github.com/pions/datachannel v1.2.1 h1:zbSwtPqVcjqUM81A3VTR7lGfeAnQgxJhheXSfBk16SM= -github.com/pions/datachannel v1.2.1/go.mod h1:Vd79tKnghclBJLCYNqN0xQzw3u3P2N/7QHYoLCLh2+Q= +github.com/pions/datachannel v1.2.2-0.20190402055840-9276b506f1f3 h1:FC+F0qb8AyRKSGJAqssQYdJpyyBSbZ0jbOKRojJ229A= +github.com/pions/datachannel v1.2.2-0.20190402055840-9276b506f1f3/go.mod h1:RO6CYOvOS7ryy2cvAhuGaeIp1JKiLQ5dQfRD2QtUfbA= github.com/pions/dtls v1.0.2 h1:VOIp3whGooFWS4X0RBOXaykNORYr05yjs8mlNYqRc+4= github.com/pions/dtls v1.0.2/go.mod h1:T22vu8VCOxNmIrbe3nnM1UdIo3m1Bx5CJNkHyehahLg= github.com/pions/dtls v1.2.2 h1:izn/74bIBxVuHb+NdirkmWMH/yFNd8PBVXJgeH/ofGU= @@ -222,10 +222,8 @@ github.com/pions/rtcp v1.1.2 h1:gTb+GOvOYDRZb+3OgZz5PE51xrHGZL0WIM5X37dGi60= github.com/pions/rtcp v1.1.2/go.mod h1:E8DBOVSErqbHrUEs8KINt3yhzO7FvKuZr2bVUKTvyaw= github.com/pions/rtp v1.1.0 h1:aioiXSi2UclJptFRqmii76GTrlgry5ucCGtdKc+5VDs= github.com/pions/rtp v1.1.0/go.mod h1:Bro/2l0PS5C3SQaEpLA+H34kpKIurx3K2Zln/nKjRMs= -github.com/pions/sctp v1.4.0 h1:U8SAVk+nWa2248SZGHCYsNyOqe/DM5+TKOAlh9Qdw8c= -github.com/pions/sctp v1.4.0/go.mod h1:dAna+Ct/aIIFiGW45yhGzuQjULWD7ni1vjoKHa9DsyU= -github.com/pions/sctp v1.4.3 h1:1nFC6nP9MhO1KNELNTTb8ETnXn5IlVJQr9s6ak0Y4l0= -github.com/pions/sctp v1.4.3/go.mod h1:Yws4nn6vR0npKJ2n2R+Cm+0JGaMKca0M1pYdGXovz3o= +github.com/pions/sctp v1.4.4-0.20190402055132-134f37845f93 h1:5j2+1lmquf7i4MKE9IaoLYub/+LWUoPqPHOZpzYgJ3Q= +github.com/pions/sctp v1.4.4-0.20190402055132-134f37845f93/go.mod h1:w5pAII2ULom/flhRb8EB9eXfbKpWYMyxVm6MUKPjKmY= github.com/pions/sdp/v2 v2.1.0 h1:YbbbaceX1aB6j3hPVdQ6GnniIRKqT/rmfnt4XvKR/E0= github.com/pions/sdp/v2 v2.1.0/go.mod h1:KGRBcHfpkgJXjrzKJz2wj/Jf1KWnsHdoIiqtayQ5QmE= github.com/pions/srtp v1.1.2 h1:mMhn9jsMUokSq+Owyviz6zw9BblBQhHiCB21kpP8KOE= @@ -239,8 +237,8 @@ github.com/pions/transport v0.5.0 h1:/KGBCzjc8bvVh8P5NP8GiSGL/PbupzhqvEOEBSlZux0 github.com/pions/transport v0.5.0/go.mod h1:9gvUd8ZeyU4ZX7dhNuUq97mPoekopkd7eCJEyhKwVO0= github.com/pions/webrtc v1.2.0 h1:U/UYMmhlVF9c1S2cfYZhR+frL0daetdP6yQnWOQzhJo= github.com/pions/webrtc v1.2.0/go.mod h1:bih1dMY7qksVxZTG2XMjIA6J7D5b92+MJzXYe+G2kng= -github.com/pions/webrtc v1.2.1-0.20190401190041-d906c2b43b07 h1:emJw4xtPnWW4HDRbdRsDLkW4ss/qzQy/S3prpkl8jsw= -github.com/pions/webrtc v1.2.1-0.20190401190041-d906c2b43b07/go.mod h1:qVcbp/iTboXX5O0EYcXctlTaiujgli6+1tDKqmlwUGA= +github.com/pions/webrtc v1.2.1-0.20190402062217-69e5725007d2 h1:J/GvOdYeJ5C91dEK5tiWnOOXComXirOgv87bRs11MXg= +github.com/pions/webrtc v1.2.1-0.20190402062217-69e5725007d2/go.mod h1:Fol6cZbNrnQhgzCTA19H+fus4C871zLcuzRE3Gcp4nY= github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I= github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= @@ -296,8 +294,8 @@ golang.org/x/sys v0.0.0-20190219092855-153ac476189d/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e h1:ZytStCyV048ZqDsWHiYDdoI2Vd4msMcrDECFxS+tL9c= golang.org/x/sys v0.0.0-20190228124157-a34e9553db1e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65 h1:hOY+O8MxdkPV10pNf7/XEHaySCiPKxixMKUshfHsGn0= -golang.org/x/sys v0.0.0-20190329044733-9eb1bfa1ce65/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190402054613-e4093980e83e h1:BxNE23eyWHQOgRBxp6VFScuzASzMHNnCsZbjKDy2ulQ= +golang.org/x/sys v0.0.0-20190402054613-e4093980e83e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/text v0.3.0 h1:g61tztE5qeGQ89tm6NTjjM9VPIm088od1l6aSorWRWg= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/tools v0.0.0-20180221164845-07fd8470d635/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= diff --git a/webrtcdirect_test.go b/webrtcdirect_test.go index 7a480ef..51c6052 100644 --- a/webrtcdirect_test.go +++ b/webrtcdirect_test.go @@ -1,38 +1,16 @@ package libp2pwebrtcdirect import ( - "reflect" - "runtime" "testing" logging "github.com/ipfs/go-log" - peer "github.com/libp2p/go-libp2p-peer" - tpt "github.com/libp2p/go-libp2p-transport" utils "github.com/libp2p/go-libp2p-transport/test" ma "github.com/multiformats/go-multiaddr" "github.com/pions/webrtc" mplex "github.com/whyrusleeping/go-smux-multiplex" ) -var Subtests = []func(t *testing.T, ta, tb tpt.Transport, maddr ma.Multiaddr, peerA peer.ID){ - utils.SubtestProtocols, - utils.SubtestBasic, - - utils.SubtestCancel, - // utils.SubtestPingPong, // TODO: ICE state becomes disconnected - - // Stolen from the stream muxer test suite. - utils.SubtestStress1Conn1Stream1Msg, - utils.SubtestStress1Conn1Stream100Msg, - // utils.SubtestStress1Conn100Stream100Msg, // TODO: ICE state becomes disconnected - // utils.SubtestStress50Conn10Stream50Msg, // TODO - // utils.SubtestStress1Conn1000Stream10Msg, // TODO - // utils.SubtestStress1Conn100Stream100Msg10MB, // TODO - // utils.SubtestStreamOpenStress, // panic: Fail in goroutine after TestTransport has completed - utils.SubtestStreamReset, -} - func TestTransport(t *testing.T) { logging.SetLogLevel("*", "warning") @@ -46,24 +24,9 @@ func TestTransport(t *testing.T) { ) addr := "/ip4/127.0.0.1/tcp/0/http/p2p-webrtc-direct" - SubtestTransport(t, ta, tb, addr, "peerA") + utils.SubtestTransport(t, ta, tb, addr, "peerA") } -func getFunctionName(i interface{}) string { - return runtime.FuncForPC(reflect.ValueOf(i).Pointer()).Name() -} - -func SubtestTransport(t *testing.T, ta, tb tpt.Transport, addr string, peerA peer.ID) { - maddr, err := ma.NewMultiaddr(addr) - if err != nil { - t.Fatal(err) - } - for _, f := range Subtests { - t.Run(getFunctionName(f), func(t *testing.T) { - f(t, ta, tb, maddr, peerA) - }) - } -} func TestTransportCantListenUtp(t *testing.T) { utpa, err := ma.NewMultiaddr("/ip4/127.0.0.1/tcp/50000") if err != nil {