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

Side by Side Diff: appengine/logdog/coordinator/endpoints/logs/get_test.go

Issue 1853433002: LogDog: Handle archive failures. (Closed) Base URL: https://github.com/luci/luci-go@logdog-gs-update
Patch Set: Regenerate protobufs. Created 4 years, 8 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 logs 5 package logs
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "errors" 9 "errors"
10 "fmt" 10 "fmt"
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
276 IndexWriter: &ibuf, 276 IndexWriter: &ibuf,
277 StreamIndexRange: 2, 277 StreamIndexRange: 2,
278 } 278 }
279 if err := archive.Archive(m); err != nil { 279 if err := archive.Archive(m); err != nil {
280 panic(err) 280 panic(err)
281 } 281 }
282 282
283 gsc.put("testbucket", "stream", lbuf.Byt es()) 283 gsc.put("testbucket", "stream", lbuf.Byt es())
284 gsc.put("testbucket", "index", ibuf.Byte s()) 284 gsc.put("testbucket", "index", ibuf.Byte s())
285 ls.State = coordinator.LSArchived 285 ls.State = coordinator.LSArchived
286 ls.ArchiveState = coordinator.Archived
286 ls.ArchiveStreamURL = "gs://testbucket/s tream" 287 ls.ArchiveStreamURL = "gs://testbucket/s tream"
287 ls.ArchiveIndexURL = "gs://testbucket/in dex" 288 ls.ArchiveIndexURL = "gs://testbucket/in dex"
288 } 289 }
289 if err := ls.Put(ds.Get(c)); err != nil { 290 if err := ls.Put(ds.Get(c)); err != nil {
290 panic(err) 291 panic(err)
291 } 292 }
292 293
293 Convey(`Testing Get requests`, func() { 294 Convey(`Testing Get requests`, func() {
294 req := logdog.GetRequest{ 295 req := logdog.GetRequest{
295 Path: string(ls.Path()), 296 Path: string(ls.Path()),
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
569 resp, err := s.Tail(c, &req) 570 resp, err := s.Tail(c, &req)
570 So(err, ShouldBeRPCOK) 571 So(err, ShouldBeRPCOK)
571 So(resp, shouldHaveLogs, 7) 572 So(resp, shouldHaveLogs, 7)
572 So(resp.State, ShouldResemble, l oadLogStreamState(ls)) 573 So(resp.State, ShouldResemble, l oadLogStreamState(ls))
573 }) 574 })
574 }) 575 })
575 }) 576 })
576 } 577 }
577 }) 578 })
578 } 579 }
OLDNEW
« no previous file with comments | « appengine/logdog/coordinator/backend/archiveCron.go ('k') | appengine/logdog/coordinator/endpoints/logs/query_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698