Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(217)

Side by Side Diff: appengine/logdog/coordinator/backend/archive_test.go

Issue 1672833003: LogDog: Add log rendering view. Base URL: https://github.com/luci/luci-go@master
Patch Set: Clean up, add tests, little reorg. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « appengine/logdog/coordinator/backend/archive.go ('k') | appengine/logdog/coordinator/backend/storageCleanup.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698