| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 archivist | 5 package archivist |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "errors" | 8 "errors" |
| 9 "fmt" | 9 "fmt" |
| 10 "strings" | 10 "strings" |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 }, | 191 }, |
| 192 }, | 192 }, |
| 193 }}, | 193 }}, |
| 194 } | 194 } |
| 195 | 195 |
| 196 d, err := proto.Marshal(&le) | 196 d, err := proto.Marshal(&le) |
| 197 if err != nil { | 197 if err != nil { |
| 198 panic(err) | 198 panic(err) |
| 199 } | 199 } |
| 200 | 200 |
| 201 » » » » err = st.Put(&storage.PutRequest{ | 201 » » » » err = st.Put(storage.PutRequest{ |
| 202 » » » » » Path: desc.Path(), | 202 » » » » » Path: desc.Path(), |
| 203 » » » » » Index: types.MessageIndex(v), | 203 » » » » » Index: types.MessageIndex(v), |
| 204 » » » » » Value: d, | 204 » » » » » Values: [][]byte{d}, |
| 205 }) | 205 }) |
| 206 if err != nil { | 206 if err != nil { |
| 207 panic(err) | 207 panic(err) |
| 208 } | 208 } |
| 209 | 209 |
| 210 // Advance the time for each log entry. | 210 // Advance the time for each log entry. |
| 211 tc.Add(time.Second) | 211 tc.Add(time.Second) |
| 212 } | 212 } |
| 213 } | 213 } |
| 214 | 214 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 } { | 485 } { |
| 486 Convey(fmt.Sprintf(`Can handle %s for %s
`, testCase.name, failName), func() { | 486 Convey(fmt.Sprintf(`Can handle %s for %s
`, testCase.name, failName), func() { |
| 487 testCase.setup() | 487 testCase.setup() |
| 488 So(ar.Archive(c, &task), ShouldE
rrLike, "test error") | 488 So(ar.Archive(c, &task), ShouldE
rrLike, "test error") |
| 489 }) | 489 }) |
| 490 } | 490 } |
| 491 } | 491 } |
| 492 }) | 492 }) |
| 493 }) | 493 }) |
| 494 } | 494 } |
| OLD | NEW |