Skip to content

Commit

Permalink
chore(bigtable): update the test proxy in accordance with the updated… (
Browse files Browse the repository at this point in the history
#7951)

… proto

Fixes: #7933
  • Loading branch information
liujiongxin authored May 16, 2023
1 parent f2c6d33 commit 63f0326
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions bigtable/internal/testproxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ func (s *goTestProxyServer) ReadRows(ctx context.Context, req *pb.ReadRowsReques
Status: &statpb.Status{
Code: int32(codes.OK),
},
Row: []*btpb.Row{},
Rows: []*btpb.Row{},
}

if err != nil {
Expand All @@ -608,7 +608,7 @@ func (s *goTestProxyServer) ReadRows(ctx context.Context, req *pb.ReadRowsReques
return res, nil
}

res.Row = rowsPb
res.Rows = rowsPb

return res, nil
}
Expand Down Expand Up @@ -726,7 +726,7 @@ func (s *goTestProxyServer) BulkMutateRows(ctx context.Context, req *pb.MutateRo
}
}

res.Entry = entries
res.Entries = entries
return res, nil
}

Expand Down Expand Up @@ -838,7 +838,7 @@ func (s *goTestProxyServer) SampleRowKeys(ctx context.Context, req *pb.SampleRow
sk = append(sk, s)
}

res.Sample = sk
res.Samples = sk

return res, nil
}
Expand Down
12 changes: 6 additions & 6 deletions bigtable/internal/testproxy/proxy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,8 @@ func TestBulkMutateRows(t *testing.T) {
t.Errorf("testproxy test: BulkMutateRows() didn't return OK; got %v", resp.Status.Code)
}

if len(resp.Entry) != 0 {
t.Errorf("testproxy test: BulkMutateRows() returned individual errors; got %v", resp.Entry)
if len(resp.Entries) != 0 {
t.Errorf("testproxy test: BulkMutateRows() returned individual errors; got %v", resp.Entries)
}
}

Expand Down Expand Up @@ -315,8 +315,8 @@ func TestReadRows(t *testing.T) {
t.Errorf("testproxy test: ReadRows() didn't return OK; got %v", resp.Status.Code)
}

if len(resp.Row) != 1 {
t.Errorf("testproxy test: SampleRowKeys() returned wrong number of results; got: %d", len(resp.Row))
if len(resp.Rows) != 1 {
t.Errorf("testproxy test: SampleRowKeys() returned wrong number of results; got: %d", len(resp.Rows))

}
}
Expand Down Expand Up @@ -388,8 +388,8 @@ func TestSampleRowKeys(t *testing.T) {
t.Errorf("testproxy test: SampleRowKeys() didn't return OK; got %v", resp.Status.Code)
}

if len(resp.Sample) != 1 {
t.Errorf("testproxy test: SampleRowKeys() returned wrong number of results; got: %d", len(resp.Sample))
if len(resp.Samples) != 1 {
t.Errorf("testproxy test: SampleRowKeys() returned wrong number of results; got: %d", len(resp.Samples))
}
}

Expand Down

0 comments on commit 63f0326

Please sign in to comment.