소스 검색

更新测试用例

tags/v1.2.4
余 欣怀 1 년 전
부모
커밋
89c18a567f
1개의 변경된 파일3개의 추가작업 그리고 4개의 파일을 삭제
  1. +3
    -4
      goes_test.go

+ 3
- 4
goes_test.go 파일 보기

@@ -5,14 +5,13 @@
package goes

import (
. "gopkg.in/check.v1"
"net/http"
"net/url"
"os"
"strings"
"testing"
"time"

. "github.com/go-check/check"
)

var (
@@ -41,7 +40,7 @@ func (s *GoesTestSuite) SetUpTest(c *C) {

func (s *GoesTestSuite) TestNewClient(c *C) {
conn := NewClient(ESHost, ESPort)
c.Assert(conn, DeepEquals, &Client{ESHost, ESPort, http.DefaultClient, ""})
c.Assert(conn, DeepEquals, &Client{ESHost, ESPort, http.DefaultClient, "", "", ""})
}

func (s *GoesTestSuite) TestWithHTTPClient(c *C) {
@@ -54,7 +53,7 @@ func (s *GoesTestSuite) TestWithHTTPClient(c *C) {
}
conn := NewClient(ESHost, ESPort).WithHTTPClient(cl)

c.Assert(conn, DeepEquals, &Client{ESHost, ESPort, cl, ""})
c.Assert(conn, DeepEquals, &Client{ESHost, ESPort, cl, "", "", ""})
c.Assert(conn.Client.Transport.(*http.Transport).DisableCompression, Equals, true)
c.Assert(conn.Client.Transport.(*http.Transport).ResponseHeaderTimeout, Equals, 1*time.Second)
}


불러오는 중...
취소
저장