| 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 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 }, | 188 }, |
| 189 }, | 189 }, |
| 190 }}, | 190 }}, |
| 191 } | 191 } |
| 192 | 192 |
| 193 d, err := proto.Marshal(&le) | 193 d, err := proto.Marshal(&le) |
| 194 if err != nil { | 194 if err != nil { |
| 195 panic(err) | 195 panic(err) |
| 196 } | 196 } |
| 197 | 197 |
| 198 » » » » err = st.Put(&storage.PutRequest{ | 198 » » » » err = st.Put(storage.PutRequest{ |
| 199 » » » » » Path: desc.Path(), | 199 » » » » » Path: desc.Path(), |
| 200 » » » » » Index: types.MessageIndex(v), | 200 » » » » » Index: types.MessageIndex(v), |
| 201 » » » » » Value: d, | 201 » » » » » Values: [][]byte{d}, |
| 202 }) | 202 }) |
| 203 if err != nil { | 203 if err != nil { |
| 204 panic(err) | 204 panic(err) |
| 205 } | 205 } |
| 206 | 206 |
| 207 // Advance the time for each log entry. | 207 // Advance the time for each log entry. |
| 208 tc.Add(time.Second) | 208 tc.Add(time.Second) |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 } { | 482 } { |
| 483 Convey(fmt.Sprintf(`Can handle %s for %s
`, testCase.name, failName), func() { | 483 Convey(fmt.Sprintf(`Can handle %s for %s
`, testCase.name, failName), func() { |
| 484 testCase.setup() | 484 testCase.setup() |
| 485 So(ar.Archive(c, &task), ShouldE
rrLike, "test error") | 485 So(ar.Archive(c, &task), ShouldE
rrLike, "test error") |
| 486 }) | 486 }) |
| 487 } | 487 } |
| 488 } | 488 } |
| 489 }) | 489 }) |
| 490 }) | 490 }) |
| 491 } | 491 } |
| OLD | NEW |