Skip to content

Commit

Permalink
Adding test updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Carey committed Jun 12, 2024
1 parent c80e0ce commit d58cd1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions xray/grpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ func (t testCase) isTestForSuccessResponse() bool {

func (t testCase) getExpectedURL() string {
if t.isTestForSuccessResponse() {
return "grpc://bufnet/mwitkow.testproto.TestService/Ping"
return "grpc://bufnet/testing.testpb.v1.TestService/Ping"
}
return "grpc://bufnet/mwitkow.testproto.TestService/PingError"
return "grpc://bufnet/testing.testpb.v1.TestService/PingError"
}

func (t testCase) getExpectedContentLength() int {
Expand Down Expand Up @@ -219,8 +219,8 @@ func TestGrpcUnaryClientInterceptor(t *testing.T) {

var subseg *Segment
assert.NoError(t, json.Unmarshal(seg.Subsegments[0], &subseg))
assert.Equal(t, "mwitkow.testproto.TestService", subseg.Name)
assert.Equal(t, "grpc://bufnet/mwitkow.testproto.TestService/Ping", subseg.HTTP.Request.URL)
assert.Equal(t, "testing.testpb.v1.TestService", subseg.Name)
assert.Equal(t, "grpc://bufnet/testing.testpb.v1.TestService/Ping", subseg.HTTP.Request.URL)
})
t.Run("custom namer", func(t *testing.T) {
lis := newGrpcServer(
Expand Down Expand Up @@ -249,7 +249,7 @@ func TestGrpcUnaryClientInterceptor(t *testing.T) {
var subseg *Segment
assert.NoError(t, json.Unmarshal(seg.Subsegments[0], &subseg))
assert.Equal(t, "custom", subseg.Name)
assert.Equal(t, "grpc://bufnet/mwitkow.testproto.TestService/Ping", subseg.HTTP.Request.URL)
assert.Equal(t, "grpc://bufnet/testing.testpb.v1.TestService/Ping", subseg.HTTP.Request.URL)
})
}

Expand Down Expand Up @@ -359,7 +359,7 @@ func TestUnaryServerInterceptor(t *testing.T) {
assert.NoError(t, err)
segment, err := td.Recv()
assert.NoError(t, err)
assert.Equal(t, "mwitkow.testproto.TestService", segment.Name)
assert.Equal(t, "testing.testpb.v1.TestService", segment.Name)
})

t.Run("chained interceptor", func(t *testing.T) {
Expand Down

0 comments on commit d58cd1a

Please sign in to comment.