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

Unified Diff: server/internal/logdog/archivist/archivist_test.go

Issue 1874563005: Archivist asserts completeness through keys scan. (Closed) Base URL: https://github.com/luci/luci-go@logdog-storage-keysonly
Patch Set: Remove unused members. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « server/internal/logdog/archivist/archivist.go ('k') | server/internal/logdog/archivist/storageSource.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/internal/logdog/archivist/archivist_test.go
diff --git a/server/internal/logdog/archivist/archivist_test.go b/server/internal/logdog/archivist/archivist_test.go
index a501fd225cf8ffdc0e1cf99c44f1f584d7476b56..d038ced77f5113d1fe4c1b014d94619a0be366b6 100644
--- a/server/internal/logdog/archivist/archivist_test.go
+++ b/server/internal/logdog/archivist/archivist_test.go
@@ -393,7 +393,7 @@ func TestHandleArchive(t *testing.T) {
Convey(`Will fail not ACK a log stream with no entries.`, func() {
ack, err := ar.archiveTaskImpl(c, task)
- So(err, ShouldErrLike, "stream has missing entries")
+ So(err, ShouldEqual, storage.ErrDoesNotExist)
So(ack, ShouldBeFalse)
})
@@ -401,7 +401,7 @@ func TestHandleArchive(t *testing.T) {
addTestEntry(0, 1, 2, 4)
ack, err := ar.archiveTaskImpl(c, task)
- So(err, ShouldErrLike, "stream has missing entries")
+ So(err, ShouldErrLike, "missing log entry")
So(ack, ShouldBeFalse)
})
@@ -424,7 +424,8 @@ func TestHandleArchive(t *testing.T) {
})
})
- Convey(`When atransient archival error occurs, will not ACK it.`, func() {
+ Convey(`When a transient archival error occurs, will not ACK it.`, func() {
+ addTestEntry(0, 1, 2, 3, 4)
gsc.newWriterErr = func(*testGSWriter) error { return errors.WrapTransient(errors.New("test error")) }
ack, err := ar.archiveTaskImpl(c, task)
@@ -433,6 +434,7 @@ func TestHandleArchive(t *testing.T) {
})
Convey(`When a non-transient archival error occurs`, func() {
+ addTestEntry(0, 1, 2, 3, 4)
archiveErr := errors.New("archive failure error")
gsc.newWriterErr = func(*testGSWriter) error { return archiveErr }
« no previous file with comments | « server/internal/logdog/archivist/archivist.go ('k') | server/internal/logdog/archivist/storageSource.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698