| 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 backend | 5 package backend |
| 6 | 6 |
| 7 import ( | 7 import ( |
| 8 "errors" | 8 "errors" |
| 9 "fmt" | 9 "fmt" |
| 10 "net/http" | 10 "net/http" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ArchiveGsBasePath: "/path/to/archive/", // Extra s
lashes, test trim. | 149 ArchiveGsBasePath: "/path/to/archive/", // Extra s
lashes, test trim. |
| 150 StorageCleanupTaskQueue: "storage-cleanup-test-queue", | 150 StorageCleanupTaskQueue: "storage-cleanup-test-queue", |
| 151 | 151 |
| 152 ArchiveDelayMax: google.NewDuration(24 * time.Hour), | 152 ArchiveDelayMax: google.NewDuration(24 * time.Hour), |
| 153 } | 153 } |
| 154 c = ct.UseConfig(c, &cfg) | 154 c = ct.UseConfig(c, &cfg) |
| 155 tq.Get(c).Testable().CreateQueue(cfg.StorageCleanupTaskQueue) | 155 tq.Get(c).Testable().CreateQueue(cfg.StorageCleanupTaskQueue) |
| 156 | 156 |
| 157 b := Backend{ | 157 b := Backend{ |
| 158 s: coordinator.Service{ | 158 s: coordinator.Service{ |
| 159 » » » » StorageFunc: func(context.Context) (storage.Stor
age, error) { | 159 » » » » IntermediateStorageFunc: func(context.Context) (
storage.Storage, error) { |
| 160 return &st, nil | 160 return &st, nil |
| 161 }, | 161 }, |
| 162 GSClientFunc: func(context.Context) (gs.Client,
error) { | 162 GSClientFunc: func(context.Context) (gs.Client,
error) { |
| 163 return &gsc, nil | 163 return &gsc, nil |
| 164 }, | 164 }, |
| 165 }, | 165 }, |
| 166 } | 166 } |
| 167 | 167 |
| 168 do := func(path string) error { | 168 do := func(path string) error { |
| 169 // Make a minimal request. | 169 // Make a minimal request. |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 So(ds.Get(c).Get(ls), Sh
ouldBeNil) | 460 So(ds.Get(c).Get(ls), Sh
ouldBeNil) |
| 461 So(ls.Updated, ShouldRes
emble, ls.Created) | 461 So(ls.Updated, ShouldRes
emble, ls.Created) |
| 462 So(ls.Archived(), Should
BeFalse) | 462 So(ls.Archived(), Should
BeFalse) |
| 463 }) | 463 }) |
| 464 } | 464 } |
| 465 } | 465 } |
| 466 }) | 466 }) |
| 467 }) | 467 }) |
| 468 }) | 468 }) |
| 469 } | 469 } |
| OLD | NEW |