Skip to content

Commit abe6984

Browse files
committed
travis: update all the tools
Fix new golint complaints
1 parent 6e7d469 commit abe6984

File tree

2 files changed

+21
-25
lines changed

2 files changed

+21
-25
lines changed

.travis.yml

+1-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,7 @@ go:
88
go_import_path: google.golang.org/grpc
99

1010
before_install:
11-
- go get golang.org/x/tools/cmd/goimports
12-
- go get github.com/golang/lint/golint
13-
- go get github.com/axw/gocov/gocov
14-
- go get github.com/mattn/goveralls
15-
- go get golang.org/x/tools/cmd/cover
11+
- go get -u golang.org/x/tools/cmd/goimports github.com/golang/lint/golint github.com/axw/gocov/gocov github.com/mattn/goveralls golang.org/x/tools/cmd/cover
1612

1713
script:
1814
- '! gofmt -s -d -l . 2>&1 | read'

test/end2end_test.go

+20-20
Original file line numberDiff line numberDiff line change
@@ -1685,7 +1685,7 @@ func testFailedServerStreaming(t *testing.T, e env) {
16851685

16861686
// concurrentSendServer is a TestServiceServer whose
16871687
// StreamingOutputCall makes ten serial Send calls, sending payloads
1688-
// "0".."9", inclusive. TestServerStreaming_Concurrent verifies they
1688+
// "0".."9", inclusive. TestServerStreamingConcurrent verifies they
16891689
// were received in the correct order, and that there were no races.
16901690
//
16911691
// All other TestServiceServer methods crash if called.
@@ -1705,14 +1705,14 @@ func (s concurrentSendServer) StreamingOutputCall(args *testpb.StreamingOutputCa
17051705
}
17061706

17071707
// Tests doing a bunch of concurrent streaming output calls.
1708-
func TestServerStreaming_Concurrent(t *testing.T) {
1708+
func TestServerStreamingConcurrent(t *testing.T) {
17091709
defer leakCheck(t)()
17101710
for _, e := range listTestEnv() {
1711-
testServerStreaming_Concurrent(t, e)
1711+
testServerStreamingConcurrent(t, e)
17121712
}
17131713
}
17141714

1715-
func testServerStreaming_Concurrent(t *testing.T, e env) {
1715+
func testServerStreamingConcurrent(t *testing.T, e env) {
17161716
te := newTest(t, e)
17171717
te.startServer(concurrentSendServer{})
17181718
defer te.tearDown()
@@ -2160,14 +2160,14 @@ func (s *funcServer) StreamingInputCall(stream testpb.TestService_StreamingInput
21602160
return s.streamingInputCall(stream)
21612161
}
21622162

2163-
func TestClientRequestBodyError_UnexpectedEOF(t *testing.T) {
2163+
func TestClientRequestBodyErrorUnexpectedEOF(t *testing.T) {
21642164
defer leakCheck(t)()
21652165
for _, e := range listTestEnv() {
2166-
testClientRequestBodyError_UnexpectedEOF(t, e)
2166+
testClientRequestBodyErrorUnexpectedEOF(t, e)
21672167
}
21682168
}
21692169

2170-
func testClientRequestBodyError_UnexpectedEOF(t *testing.T, e env) {
2170+
func testClientRequestBodyErrorUnexpectedEOF(t *testing.T, e env) {
21712171
te := newTest(t, e)
21722172
ts := &funcServer{unaryCall: func(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) {
21732173
errUnexpectedCall := errors.New("unexpected call func server method")
@@ -2184,14 +2184,14 @@ func testClientRequestBodyError_UnexpectedEOF(t *testing.T, e env) {
21842184
})
21852185
}
21862186

2187-
func TestClientRequestBodyError_CloseAfterLength(t *testing.T) {
2187+
func TestClientRequestBodyErrorCloseAfterLength(t *testing.T) {
21882188
defer leakCheck(t)()
21892189
for _, e := range listTestEnv() {
2190-
testClientRequestBodyError_CloseAfterLength(t, e)
2190+
testClientRequestBodyErrorCloseAfterLength(t, e)
21912191
}
21922192
}
21932193

2194-
func testClientRequestBodyError_CloseAfterLength(t *testing.T, e env) {
2194+
func testClientRequestBodyErrorCloseAfterLength(t *testing.T, e env) {
21952195
te := newTest(t, e)
21962196
te.declareLogNoise("Server.processUnaryRPC failed to write status")
21972197
ts := &funcServer{unaryCall: func(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) {
@@ -2209,14 +2209,14 @@ func testClientRequestBodyError_CloseAfterLength(t *testing.T, e env) {
22092209
})
22102210
}
22112211

2212-
func TestClientRequestBodyError_Cancel(t *testing.T) {
2212+
func TestClientRequestBodyErrorCancel(t *testing.T) {
22132213
defer leakCheck(t)()
22142214
for _, e := range listTestEnv() {
2215-
testClientRequestBodyError_Cancel(t, e)
2215+
testClientRequestBodyErrorCancel(t, e)
22162216
}
22172217
}
22182218

2219-
func testClientRequestBodyError_Cancel(t *testing.T, e env) {
2219+
func testClientRequestBodyErrorCancel(t *testing.T, e env) {
22202220
te := newTest(t, e)
22212221
gotCall := make(chan bool, 1)
22222222
ts := &funcServer{unaryCall: func(ctx context.Context, in *testpb.SimpleRequest) (*testpb.SimpleResponse, error) {
@@ -2246,14 +2246,14 @@ func testClientRequestBodyError_Cancel(t *testing.T, e env) {
22462246
})
22472247
}
22482248

2249-
func TestClientRequestBodyError_Cancel_StreamingInput(t *testing.T) {
2249+
func TestClientRequestBodyErrorCancelStreamingInput(t *testing.T) {
22502250
defer leakCheck(t)()
22512251
for _, e := range listTestEnv() {
2252-
testClientRequestBodyError_Cancel_StreamingInput(t, e)
2252+
testClientRequestBodyErrorCancelStreamingInput(t, e)
22532253
}
22542254
}
22552255

2256-
func testClientRequestBodyError_Cancel_StreamingInput(t *testing.T, e env) {
2256+
func testClientRequestBodyErrorCancelStreamingInput(t *testing.T, e env) {
22572257
te := newTest(t, e)
22582258
recvErr := make(chan error, 1)
22592259
ts := &funcServer{streamingInputCall: func(stream testpb.TestService_StreamingInputCallServer) error {
@@ -2283,12 +2283,12 @@ func testClientRequestBodyError_Cancel_StreamingInput(t *testing.T, e env) {
22832283

22842284
const clientAlwaysFailCredErrorMsg = "clientAlwaysFailCred always fails"
22852285

2286-
var clientAlwaysFailCredError = errors.New(clientAlwaysFailCredErrorMsg)
2286+
var errClientAlwaysFailCred = errors.New(clientAlwaysFailCredErrorMsg)
22872287

22882288
type clientAlwaysFailCred struct{}
22892289

22902290
func (c clientAlwaysFailCred) ClientHandshake(ctx context.Context, addr string, rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) {
2291-
return nil, nil, clientAlwaysFailCredError
2291+
return nil, nil, errClientAlwaysFailCred
22922292
}
22932293
func (c clientAlwaysFailCred) ServerHandshake(rawConn net.Conn) (net.Conn, credentials.AuthInfo, error) {
22942294
return rawConn, nil, nil
@@ -2308,8 +2308,8 @@ func TestDialWithBlockErrorOnBadCertificates(t *testing.T) {
23082308
)
23092309
opts = append(opts, grpc.WithTransportCredentials(clientAlwaysFailCred{}), grpc.WithBlock())
23102310
te.cc, err = grpc.Dial(te.srvAddr, opts...)
2311-
if err != clientAlwaysFailCredError {
2312-
te.t.Fatalf("Dial(%q) = %v, want %v", te.srvAddr, err, clientAlwaysFailCredError)
2311+
if err != errClientAlwaysFailCred {
2312+
te.t.Fatalf("Dial(%q) = %v, want %v", te.srvAddr, err, errClientAlwaysFailCred)
23132313
}
23142314
}
23152315

0 commit comments

Comments
 (0)