Skip to content

Commit

Permalink
feat(bigtable): fixing vet failures
Browse files Browse the repository at this point in the history
  • Loading branch information
bhshkh committed May 31, 2024
1 parent d3b683a commit 6ecd689
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions bigtable/metrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ import (
)

var (
clusterId1 = "cluster-id-1"
clusterId2 = "cluster-id-2"
zoneId1 = "zone-id-1"
clusterID1 = "cluster-id-1"
clusterID2 = "cluster-id-2"
zoneID1 = "zone-id-1"

testHeaders, _ = proto.Marshal(&btpb.ResponseParams{
ClusterId: &clusterId1,
ZoneId: &zoneId1,
ClusterId: &clusterID1,
ZoneId: &zoneID1,
})
testTrailers, _ = proto.Marshal(&btpb.ResponseParams{
ClusterId: &clusterId2,
ZoneId: &zoneId1,
ClusterId: &clusterID2,
ZoneId: &zoneID1,
})

testHeaderMD = &metadata.MD{
Expand Down Expand Up @@ -93,8 +93,8 @@ func TestToOtelMetricAttrs(t *testing.T) {
attribute.String(metricLabelKeyMethod, "ReadRows"),
attribute.Bool(metricLabelKeyStreamingOperation, true),
attribute.String(metricLabelKeyOperationStatus, codes.OK.String()),
attribute.String(monitoredResLabelKeyCluster, clusterId1),
attribute.String(monitoredResLabelKeyZone, zoneId1),
attribute.String(monitoredResLabelKeyCluster, clusterID1),
attribute.String(monitoredResLabelKeyZone, zoneID1),
},
wantError: nil,
},
Expand Down Expand Up @@ -229,24 +229,24 @@ func TestGetLocation(t *testing.T) {
desc: "Location metadata in header",
headerMD: testHeaderMD,
trailerMD: &metadata.MD{},
wantCluster: clusterId1,
wantZone: zoneId1,
wantCluster: clusterID1,
wantZone: zoneID1,
wantError: nil,
},
{
desc: "Location metadata in trailer",
headerMD: &metadata.MD{},
trailerMD: testTrailerMD,
wantCluster: clusterId2,
wantZone: zoneId1,
wantCluster: clusterID2,
wantZone: zoneID1,
wantError: nil,
},
{
desc: "Location metadata in both header and trailer",
headerMD: testHeaderMD,
trailerMD: testTrailerMD,
wantCluster: clusterId1,
wantZone: zoneId1,
wantCluster: clusterID1,
wantZone: zoneID1,
wantError: nil,
},
{
Expand Down

0 comments on commit 6ecd689

Please sign in to comment.