vendor: update all dependencies
This commit is contained in:
+10
-10
@@ -123,7 +123,7 @@ func TestFromLogEntry(t *testing.T) {
|
||||
logEntry := logpb.LogEntry{
|
||||
LogName: "projects/PROJECT_ID/logs/LOG_ID",
|
||||
Resource: res,
|
||||
Payload: &logpb.LogEntry_TextPayload{"hello"},
|
||||
Payload: &logpb.LogEntry_TextPayload{TextPayload: "hello"},
|
||||
Timestamp: ts,
|
||||
Severity: logtypepb.LogSeverity_INFO,
|
||||
InsertId: "123",
|
||||
@@ -210,31 +210,31 @@ func TestFromLogEntry(t *testing.T) {
|
||||
LogName: "projects/PROJECT_ID/logs/LOG_ID",
|
||||
Resource: res,
|
||||
Timestamp: ts,
|
||||
Payload: &logpb.LogEntry_ProtoPayload{any},
|
||||
Payload: &logpb.LogEntry_ProtoPayload{ProtoPayload: any},
|
||||
}
|
||||
got, err = fromLogEntry(&logEntry)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(got.Payload, alog) {
|
||||
if !ltesting.PayloadEqual(got.Payload, alog) {
|
||||
t.Errorf("got %+v, want %+v", got.Payload, alog)
|
||||
}
|
||||
|
||||
// JSON payload.
|
||||
jstruct := &structpb.Struct{map[string]*structpb.Value{
|
||||
"f": &structpb.Value{&structpb.Value_NumberValue{3.1}},
|
||||
jstruct := &structpb.Struct{Fields: map[string]*structpb.Value{
|
||||
"f": &structpb.Value{Kind: &structpb.Value_NumberValue{NumberValue: 3.1}},
|
||||
}}
|
||||
logEntry = logpb.LogEntry{
|
||||
LogName: "projects/PROJECT_ID/logs/LOG_ID",
|
||||
Resource: res,
|
||||
Timestamp: ts,
|
||||
Payload: &logpb.LogEntry_JsonPayload{jstruct},
|
||||
Payload: &logpb.LogEntry_JsonPayload{JsonPayload: jstruct},
|
||||
}
|
||||
got, err = fromLogEntry(&logEntry)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if !reflect.DeepEqual(got.Payload, jstruct) {
|
||||
if !ltesting.PayloadEqual(got.Payload, jstruct) {
|
||||
t.Errorf("got %+v, want %+v", got.Payload, jstruct)
|
||||
}
|
||||
}
|
||||
@@ -263,9 +263,9 @@ func TestListLogEntriesRequest(t *testing.T) {
|
||||
} {
|
||||
got := listLogEntriesRequest("PROJECT_ID", test.opts)
|
||||
want := &logpb.ListLogEntriesRequest{
|
||||
ProjectIds: test.projectIDs,
|
||||
Filter: test.filter,
|
||||
OrderBy: test.orderBy,
|
||||
ResourceNames: []string{"projects/" + test.projectIDs[0]},
|
||||
Filter: test.filter,
|
||||
OrderBy: test.orderBy,
|
||||
}
|
||||
if !proto.Equal(got, want) {
|
||||
t.Errorf("%v:\ngot %v\nwant %v", test.opts, got, want)
|
||||
|
||||
Reference in New Issue
Block a user