| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 package logs | 5 package logs |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "fmt" | 8 "fmt" |
| 9 "sort" | 9 "sort" |
| 10 "testing" | 10 "testing" |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 case "purged": | 160 case "purged": |
| 161 ls.Purged = true | 161 ls.Purged = true |
| 162 | 162 |
| 163 case "terminated": | 163 case "terminated": |
| 164 ls.State = coordinator.LSTermina
ted | 164 ls.State = coordinator.LSTermina
ted |
| 165 ls.TerminalIndex = 1337 | 165 ls.TerminalIndex = 1337 |
| 166 | 166 |
| 167 case "archived": | 167 case "archived": |
| 168 ls.ArchiveStreamURL = "http://ex
ample.com" | 168 ls.ArchiveStreamURL = "http://ex
ample.com" |
| 169 ls.State = coordinator.LSArchive
d | 169 ls.State = coordinator.LSArchive
d |
| 170 ls.ArchiveState = coordinator.Ar
chived |
| 170 | 171 |
| 171 case "datagram": | 172 case "datagram": |
| 172 ls.StreamType = logpb.StreamType
_DATAGRAM | 173 ls.StreamType = logpb.StreamType
_DATAGRAM |
| 173 | 174 |
| 174 case "binary": | 175 case "binary": |
| 175 ls.StreamType = logpb.StreamType
_BINARY | 176 ls.StreamType = logpb.StreamType
_BINARY |
| 176 } | 177 } |
| 177 } | 178 } |
| 178 } | 179 } |
| 179 | 180 |
| (...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 504 | 505 |
| 505 Convey(`When an invalid tag is specified, returns BadReq
uest error`, func() { | 506 Convey(`When an invalid tag is specified, returns BadReq
uest error`, func() { |
| 506 req.Tags["+++not a valid tag+++"] = "" | 507 req.Tags["+++not a valid tag+++"] = "" |
| 507 | 508 |
| 508 _, err := s.Query(c, &req) | 509 _, err := s.Query(c, &req) |
| 509 So(err, ShouldBeRPCInvalidArgument, "invalid tag
constraint") | 510 So(err, ShouldBeRPCInvalidArgument, "invalid tag
constraint") |
| 510 }) | 511 }) |
| 511 }) | 512 }) |
| 512 }) | 513 }) |
| 513 } | 514 } |
| OLD | NEW |