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

Unified Diff: server/logdog/storage/bigtable/storage_test.go

Issue 1909943003: LogDog: Add project support to Storage. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-coordinator-services
Patch Set: Rebase? 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/logdog/storage/bigtable/storage.go ('k') | server/logdog/storage/memory/memory.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: server/logdog/storage/bigtable/storage_test.go
diff --git a/server/logdog/storage/bigtable/storage_test.go b/server/logdog/storage/bigtable/storage_test.go
index 52025707355656f1acee249374d998bf0c265893..b22a24aab47073e3c04b7c12b06d7d82a4f0d54f 100644
--- a/server/logdog/storage/bigtable/storage_test.go
+++ b/server/logdog/storage/bigtable/storage_test.go
@@ -11,6 +11,7 @@ import (
"time"
"github.com/luci/gkvlite"
+ "github.com/luci/luci-go/common/config"
"github.com/luci/luci-go/common/logdog/types"
"github.com/luci/luci-go/common/recordio"
"github.com/luci/luci-go/server/logdog/storage"
@@ -175,11 +176,13 @@ func testStorageImpl(t *testing.T, legacy bool) {
s.raw = &bt
defer s.Close()
+ project := config.ProjectName("test-project")
get := func(path string, index int, limit int) ([]string, error) {
req := storage.GetRequest{
- Path: types.StreamPath(path),
- Index: types.MessageIndex(index),
- Limit: limit,
+ Project: project,
+ Path: types.StreamPath(path),
+ Index: types.MessageIndex(index),
+ Limit: limit,
}
got := []string{}
err := s.Get(req, func(idx types.MessageIndex, d []byte) bool {
@@ -196,14 +199,15 @@ func testStorageImpl(t *testing.T, legacy bool) {
}
return s.Put(storage.PutRequest{
- Path: types.StreamPath(path),
- Index: types.MessageIndex(index),
- Values: data,
+ Project: project,
+ Path: types.StreamPath(path),
+ Index: types.MessageIndex(index),
+ Values: data,
})
}
- ekey := func(p string, v, c int64) string {
- return newRowKey(p, v, c).encode()
+ ekey := func(path string, v, c int64) string {
+ return newRowKey(string(project), path, v, c).encode()
}
records := func(s ...string) []byte {
buf := bytes.Buffer{}
@@ -297,7 +301,7 @@ func testStorageImpl(t *testing.T, legacy bool) {
Convey(`Testing "Tail"...`, func() {
tail := func(path string) (string, error) {
- got, _, err := s.Tail(types.StreamPath(path))
+ got, _, err := s.Tail(project, types.StreamPath(path))
return string(got), err
}
« no previous file with comments | « server/logdog/storage/bigtable/storage.go ('k') | server/logdog/storage/memory/memory.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698