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

Side by Side Diff: appengine/logdog/coordinator/coordinatorTest/logStream.go

Issue 1910923002: LogDog: Add project namespace to service endpoint. (Closed) Base URL: https://github.com/luci/luci-go@logdog-project-coordinator-backend
Patch Set: Comments. 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 unified diff | Download patch
« no previous file with comments | « no previous file | appengine/logdog/coordinator/endpoints/projectBoundMessage.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 package coordinatorTest 5 package coordinatorTest
6 6
7 import ( 7 import (
8 "bytes" 8 "bytes"
9 "fmt" 9 "fmt"
10 10
(...skipping 23 matching lines...) Expand all
34 ls, err := coordinator.NewLogStream(string(desc.Path())) 34 ls, err := coordinator.NewLogStream(string(desc.Path()))
35 if err != nil { 35 if err != nil {
36 panic(err) 36 panic(err)
37 } 37 }
38 if err := ls.LoadDescriptor(desc); err != nil { 38 if err := ls.LoadDescriptor(desc); err != nil {
39 panic(err) 39 panic(err)
40 } 40 }
41 41
42 ls.ProtoVersion = logpb.Version 42 ls.ProtoVersion = logpb.Version
43 ls.Created = ds.RoundTime(clock.Now(c).UTC()) 43 ls.Created = ds.RoundTime(clock.Now(c).UTC())
44 » ls.Secret = bytes.Repeat([]byte{0x6F}, types.StreamSecretLength) 44 » ls.Secret = bytes.Repeat([]byte{0x6F}, types.PrefixSecretLength)
45 ls.TerminalIndex = -1 45 ls.TerminalIndex = -1
46 return ls 46 return ls
47 } 47 }
48 48
49 // TestLogEntry generates a standard testing text logpb.LogEntry. 49 // TestLogEntry generates a standard testing text logpb.LogEntry.
50 func TestLogEntry(c context.Context, ls *coordinator.LogStream, i int) *logpb.Lo gEntry { 50 func TestLogEntry(c context.Context, ls *coordinator.LogStream, i int) *logpb.Lo gEntry {
51 return &logpb.LogEntry{ 51 return &logpb.LogEntry{
52 TimeOffset: google.NewDuration(clock.Now(c).Sub(ls.Created)), 52 TimeOffset: google.NewDuration(clock.Now(c).Sub(ls.Created)),
53 StreamIndex: uint64(i), 53 StreamIndex: uint64(i),
54 54
55 Content: &logpb.LogEntry_Text{ 55 Content: &logpb.LogEntry_Text{
56 &logpb.Text{ 56 &logpb.Text{
57 Lines: []*logpb.Text_Line{ 57 Lines: []*logpb.Text_Line{
58 { 58 {
59 Value: fmt.Sprintf("log entr y #%d", i), 59 Value: fmt.Sprintf("log entr y #%d", i),
60 Delimiter: "\n", 60 Delimiter: "\n",
61 }, 61 },
62 }, 62 },
63 }, 63 },
64 }, 64 },
65 } 65 }
66 } 66 }
OLDNEW
« no previous file with comments | « no previous file | appengine/logdog/coordinator/endpoints/projectBoundMessage.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698