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

Unified Diff: logdog/common/archive/archive_test.go

Issue 2435883002: LogDog: Fix archival Get/Tail implementations. (Closed)
Patch Set: LogDog: Fix archival Get/Tail implementations. Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: logdog/common/archive/archive_test.go
diff --git a/logdog/common/archive/archive_test.go b/logdog/common/archive/archive_test.go
index 1637ff496f6a552d96304704c304fd3b46db78d5..089637a0276a39e74f28cf6fe297c1d72e66866c 100644
--- a/logdog/common/archive/archive_test.go
+++ b/logdog/common/archive/archive_test.go
@@ -153,7 +153,7 @@ func (ic *indexChecker) shouldContainIndexFor(actual interface{}, expected ...in
return "failed to skip descriptor frame"
}
for {
- offset := cr.Count()
+ offset := cr.Count
d, err = r.ReadFrameAll()
if err == io.EOF {
break
@@ -374,7 +374,7 @@ func TestArchive(t *testing.T) {
m.StreamIndexRange = 3
So(Archive(m), ShouldBeNil)
- So(&indexB, ic.shouldContainIndexFor, desc, &logB, 0, 3)
+ So(&indexB, ic.shouldContainIndexFor, desc, &logB, 0, 3, 5)
So(indexParams(indexB.Bytes()), ShouldResemble, logpb.LogIndex{
Desc: desc,
LastPrefixIndex: 10,
@@ -388,7 +388,7 @@ func TestArchive(t *testing.T) {
So(Archive(m), ShouldBeNil)
// Note that in our generated logs, PrefixIndex = 2*StreamIndex.
- So(&indexB, ic.shouldContainIndexFor, desc, &logB, 0, 2, 4)
+ So(&indexB, ic.shouldContainIndexFor, desc, &logB, 0, 2, 4, 5)
So(indexParams(indexB.Bytes()), ShouldResemble, logpb.LogIndex{
Desc: desc,
LastPrefixIndex: 10,

Powered by Google App Engine
This is Rietveld 408576698