mirror of https://github.com/schollz/croc.git
add back travis
This commit is contained in:
parent
d56a25cf76
commit
962ea50aee
|
@ -0,0 +1,19 @@
|
||||||
|
language: go
|
||||||
|
|
||||||
|
go:
|
||||||
|
- tip
|
||||||
|
|
||||||
|
env:
|
||||||
|
- "PATH=/home/travis/gopath/bin:$PATH"
|
||||||
|
|
||||||
|
install: true
|
||||||
|
|
||||||
|
script:
|
||||||
|
- env GO111MODULE=on go build -v
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/compress
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/croc
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/crypt
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/tcp
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/utils
|
||||||
|
- env GO111MODULE=on go test -v -cover github.com/schollz/croc/v6/src/comm
|
||||||
|
|
|
@ -29,4 +29,5 @@ func TestTCP(t *testing.T) {
|
||||||
assert.Equal(t, []byte("hello, c1"), data)
|
assert.Equal(t, []byte("hello, c1"), data)
|
||||||
|
|
||||||
c1.Close()
|
c1.Close()
|
||||||
|
time.Sleep(300 * time.Millisecond)
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@ func TestExists(t *testing.T) {
|
||||||
func TestHashFile(t *testing.T) {
|
func TestHashFile(t *testing.T) {
|
||||||
b, err := HashFile("utils.go")
|
b, err := HashFile("utils.go")
|
||||||
assert.Nil(t, err)
|
assert.Nil(t, err)
|
||||||
assert.Equal(t, "6d39c2f3468e0d5869e0c9b349503175", fmt.Sprintf("%x", b))
|
assert.Equal(t, "314965d4170cd0c70bd2e4f6c977750a", fmt.Sprintf("%x", b))
|
||||||
}
|
}
|
||||||
|
|
||||||
// SHA256 returns sha256 sum
|
// SHA256 returns sha256 sum
|
||||||
|
@ -27,8 +27,3 @@ func TestSHA256(t *testing.T) {
|
||||||
func TestByteCountDecimal(t *testing.T) {
|
func TestByteCountDecimal(t *testing.T) {
|
||||||
assert.Equal(t, "10.0 kB", ByteCountDecimal(10000))
|
assert.Equal(t, "10.0 kB", ByteCountDecimal(10000))
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestMissingChunks(t *testing.T) {
|
|
||||||
chunks := MissingChunks("test",11346432,1024 * 32)
|
|
||||||
assert.Equal(t,202,len(chunks))
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue