| OLD | NEW |
| 1 // Copyright 2015 The LUCI Authors. All rights reserved. | 1 // Copyright 2015 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 package streamclient | 5 package streamclient |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "bytes" | 8 "bytes" |
| 9 "errors" | 9 "errors" |
| 10 "io" | 10 "io" |
| 11 "testing" | 11 "testing" |
| 12 | 12 |
| 13 "github.com/luci/luci-go/common/clock/clockflag" | 13 "github.com/luci/luci-go/common/clock/clockflag" |
| 14 "github.com/luci/luci-go/common/clock/testclock" | 14 "github.com/luci/luci-go/common/clock/testclock" |
| 15 "github.com/luci/luci-go/common/data/recordio" | 15 "github.com/luci/luci-go/common/data/recordio" |
| 16 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" | 16 "github.com/luci/luci-go/logdog/client/butlerlib/streamproto" |
| 17 |
| 17 . "github.com/smartystreets/goconvey/convey" | 18 . "github.com/smartystreets/goconvey/convey" |
| 18 ) | 19 ) |
| 19 | 20 |
| 20 type testStreamWriteCloser struct { | 21 type testStreamWriteCloser struct { |
| 21 bytes.Buffer | 22 bytes.Buffer |
| 22 addr string | 23 addr string |
| 23 | 24 |
| 24 err error | 25 err error |
| 25 closed bool | 26 closed bool |
| 26 } | 27 } |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 tswcErr = errors.New("test error") | 102 tswcErr = errors.New("test error") |
| 102 _, err := client.NewStream(flags) | 103 _, err := client.NewStream(flags) |
| 103 So(err, ShouldNotBeNil) | 104 So(err, ShouldNotBeNil) |
| 104 | 105 |
| 105 So(tswc, ShouldNotBeNil) | 106 So(tswc, ShouldNotBeNil) |
| 106 So(tswc.closed, ShouldBeTrue) | 107 So(tswc.closed, ShouldBeTrue) |
| 107 }) | 108 }) |
| 108 }) | 109 }) |
| 109 }) | 110 }) |
| 110 } | 111 } |
| OLD | NEW |