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

Unified Diff: logdog/common/storage/bigtable/bigtable_test.go

Issue 2435113002: LogDog: Add Storage-layer data caching. (Closed)
Patch Set: Fix byteLimit bug. 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
« no previous file with comments | « logdog/common/storage/bigtable/bigtable.go ('k') | logdog/common/storage/bigtable/cache.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/common/storage/bigtable/bigtable_test.go
diff --git a/logdog/common/storage/bigtable/bigtable_test.go b/logdog/common/storage/bigtable/bigtable_test.go
index 2d6f8c5ba9ddeba3af7c0fb084503a9ed99cd19d..a358c41decb919707f5dfc19a32685b6e0ab0667 100644
--- a/logdog/common/storage/bigtable/bigtable_test.go
+++ b/logdog/common/storage/bigtable/bigtable_test.go
@@ -20,16 +20,7 @@ func TestBigTable(t *testing.T) {
t.Parallel()
Convey(`Testing BigTable internal functions`, t, func() {
- var bt btTableTest
- defer bt.close()
-
- s := newBTStorage(context.Background(), Options{
- Project: "test-project",
- Instance: "test-instance",
- LogTable: "test-log-table",
- }, nil, nil)
-
- s.raw = &bt
+ s := NewMemoryInstance(context.Background(), Options{})
defer s.Close()
Convey(`Given a fake BigTable row`, func() {
@@ -72,13 +63,14 @@ func TestBigTable(t *testing.T) {
Convey(`Can successfully apply configuration.`, func() {
So(s.Config(cfg), ShouldBeNil)
- So(bt.maxLogAge, ShouldEqual, cfg.MaxLogAge)
+ So(s.MaxLogAge(), ShouldEqual, cfg.MaxLogAge)
})
Convey(`With return an error if the configuration fails to apply.`, func() {
- bt.err = errors.New("test error")
+ testErr := errors.New("test error")
+ s.SetErr(testErr)
- So(s.Config(cfg), ShouldEqual, bt.err)
+ So(s.Config(cfg), ShouldEqual, testErr)
})
})
})
« no previous file with comments | « logdog/common/storage/bigtable/bigtable.go ('k') | logdog/common/storage/bigtable/cache.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698