Commit 47a64535 authored by tavit ohanian's avatar tavit ohanian

initial port

parent 57df3f6a
Pipeline #654 failed with stages
in 11 minutes and 26 seconds
stages:
- build
- test
variables:
BUILD_DIR: "/tmp/$CI_CONCURRENT_PROJECT_ID"
before_script:
- mkdir -p $BUILD_DIR/src
- cd $BUILD_DIR/src
- if [ -d $CI_PROJECT_DIR ]
- then
- echo "soft link $CI_PROJECT_DIR exists"
- else
- echo "creating soft link $CI_PROJECT_DIR"
- ln -s $CI_PROJECT_DIR
- fi
- cd $CI_PROJECT_DIR
build:
stage: build
tags:
- testing
script:
- echo $CI_JOB_STAGE
- go build
test:
stage: test
tags:
- testing
script:
- echo $CI_JOB_STAGE
- go test -cover
coverage: '/coverage: \d+.\d+% of statements/'
...@@ -3,7 +3,7 @@ package cidranger ...@@ -3,7 +3,7 @@ package cidranger
import ( import (
"net" "net"
rnet "github.com/libp2p/go-cidranger/net" rnet "gitlab.dms3.io/p2p/go-cidranger/net"
) )
// bruteRanger is a brute force implementation of Ranger. Insertion and // bruteRanger is a brute force implementation of Ranger. Insertion and
......
...@@ -8,8 +8,8 @@ import ( ...@@ -8,8 +8,8 @@ import (
"testing" "testing"
"time" "time"
rnet "github.com/libp2p/go-cidranger/net"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
rnet "gitlab.dms3.io/p2p/go-cidranger/net"
) )
/* /*
......
github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/ipfs/go-detect-race v0.0.1 h1:qX/xay2W3E4Q1U7d9lNs1sU9nvguX0a7319XbyQ6cOk=
github.com/ipfs/go-detect-race v0.0.1/go.mod h1:8BNT7shDZPo99Q74BpGMK+4D8Mn4j46UU0LZ723meps=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk= github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4= github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
gitlab.dms3.io/dms3/public/go-detect-race v0.0.1 h1:njXKVicy8gRJxyKtG8znbzxpqzxDQBSlzlLTXOna2dU=
gitlab.dms3.io/dms3/public/go-detect-race v0.0.1/go.mod h1:NcJv8mYRyNhzWxY9ry4uRt0iD+0f7AvunqCKLgqJpwI=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw=
......
...@@ -5,7 +5,7 @@ import ( ...@@ -5,7 +5,7 @@ import (
"net" "net"
"strings" "strings"
rnet "github.com/libp2p/go-cidranger/net" rnet "gitlab.dms3.io/p2p/go-cidranger/net"
) )
// prefixTrie is a path-compressed (PC) trie implementation of the // prefixTrie is a path-compressed (PC) trie implementation of the
......
...@@ -2,15 +2,16 @@ package cidranger ...@@ -2,15 +2,16 @@ package cidranger
import ( import (
"encoding/binary" "encoding/binary"
detectrace "github.com/ipfs/go-detect-race"
"math/rand" "math/rand"
"net" "net"
"runtime" "runtime"
"testing" "testing"
"time" "time"
rnet "github.com/libp2p/go-cidranger/net" detectrace "gitlab.dms3.io/dms3/public/go-detect-race"
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
rnet "gitlab.dms3.io/p2p/go-cidranger/net"
) )
func getAllByVersion(version rnet.IPVersion) *net.IPNet { func getAllByVersion(version rnet.IPVersion) *net.IPNet {
......
...@@ -3,7 +3,7 @@ package cidranger ...@@ -3,7 +3,7 @@ package cidranger
import ( import (
"net" "net"
rnet "github.com/libp2p/go-cidranger/net" rnet "gitlab.dms3.io/p2p/go-cidranger/net"
) )
type rangerFactory func(rnet.IPVersion) Ranger type rangerFactory func(rnet.IPVersion) Ranger
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment