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

Unified Diff: appengine/logdog/coordinator/coordinatorTest/logStream.go

Issue 1967273002: LogDog: Implement RegisterPrefix RPC. (Closed) Base URL: https://github.com/luci/luci-go@logdog-butler-register-coordinator-endpoint
Patch Set: Updated patchset dependency Created 4 years, 7 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 | « no previous file | appengine/logdog/coordinator/endpoints/registration/registerPrefix.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/logdog/coordinator/coordinatorTest/logStream.go
diff --git a/appengine/logdog/coordinator/coordinatorTest/logStream.go b/appengine/logdog/coordinator/coordinatorTest/logStream.go
index 983e2abc6fd46a672d4102814e636663d526238a..df3bf9112efc8ed71798b49e6b205c89ccbbf0ea 100644
--- a/appengine/logdog/coordinator/coordinatorTest/logStream.go
+++ b/appengine/logdog/coordinator/coordinatorTest/logStream.go
@@ -7,6 +7,7 @@ package coordinatorTest
import (
"bytes"
"fmt"
+ "time"
"github.com/golang/protobuf/proto"
ds "github.com/luci/gae/service/datastore"
@@ -46,11 +47,18 @@ type TestStream struct {
func MakeStream(c context.Context, project config.ProjectName, path types.StreamPath) *TestStream {
prefix, name := path.Split()
- now := ds.RoundTime(clock.Now(c)).UTC()
+ now := clock.Now(c).UTC()
secret := TestSecret()
ts := TestStream{
Project: project,
+ Prefix: &coordinator.LogPrefix{
+ ID: "", // Filled in by Reload.
+ Created: ds.RoundTime(now),
+ Prefix: "", // Filled in by Reload.
+ Source: []string{"test suite"},
+ Secret: secret,
+ },
Desc: &logpb.LogStreamDescriptor{
Prefix: string(prefix),
Name: string(name),
@@ -58,18 +66,18 @@ func MakeStream(c context.Context, project config.ProjectName, path types.Stream
ContentType: "application/text",
Timestamp: google.NewTimestamp(now),
},
- Prefix: &coordinator.LogPrefix{
- Created: ds.RoundTime(now),
- Secret: secret,
- },
State: &coordinator.LogStreamState{
- Created: now,
+ Parent: nil, // Filled in by Reload.
+ Created: ds.RoundTime(now),
+ Updated: time.Time{}, // Filled in by Reload.
Secret: secret,
TerminalIndex: -1,
},
Stream: &coordinator.LogStream{
+ ID: "", // Filled in by Reload.
ProtoVersion: logpb.Version,
- Created: now,
+ Created: ds.RoundTime(now),
+ // Descriptor-derived fields filled in by Reload.
},
}
ts.Reload(c)
« no previous file with comments | « no previous file | appengine/logdog/coordinator/endpoints/registration/registerPrefix.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698