mirror of
https://github.com/HDT3213/godis.git
synced 2025-10-05 16:57:06 +08:00
add travis.yml
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -11,6 +11,7 @@
|
||||
# Output of the go coverage tool, specifically when used with LiteIDE
|
||||
*.out
|
||||
target/
|
||||
coverage.txt
|
||||
|
||||
logs
|
||||
|
||||
|
14
.travis.yml
Normal file
14
.travis.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
language: go
|
||||
|
||||
go:
|
||||
- 1.16
|
||||
|
||||
before_install:
|
||||
- go get -t -v ./...
|
||||
- sudo apt-get install redis-server
|
||||
|
||||
script:
|
||||
- go test -coverprofile=coverage.txt -covermode=atomic ./...
|
||||
|
||||
after_success:
|
||||
- bash <(curl -s https://codecov.io/bash)
|
@@ -1,4 +1,4 @@
|
||||
# Godis
|
||||
 
|
||||
|
||||
[中文版](https://github.com/hdt3213/godis/blob/master/README_CN.md)
|
||||
|
||||
|
@@ -3,6 +3,7 @@ package client
|
||||
import (
|
||||
"github.com/hdt3213/godis/lib/logger"
|
||||
"github.com/hdt3213/godis/redis/reply"
|
||||
"strconv"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -55,7 +56,7 @@ func TestClient(t *testing.T) {
|
||||
})
|
||||
if intRet, ok := result.(*reply.IntReply); ok {
|
||||
if intRet.Code != 1 {
|
||||
t.Error("`del` failed, result: " + string(intRet.Code))
|
||||
t.Error("`del` failed, result: " + strconv.FormatInt(intRet.Code, 10))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,7 +82,7 @@ func TestClient(t *testing.T) {
|
||||
})
|
||||
if intRet, ok := result.(*reply.IntReply); ok {
|
||||
if intRet.Code != 3 {
|
||||
t.Error("`rpush` failed, result: " + string(intRet.Code))
|
||||
t.Error("`rpush` failed, result: " + strconv.FormatInt(intRet.Code, 10))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user