class GoogleRpcStatusTestService
A test service that fills in the “reserved” grpc-status-details-bin trailer, for client-side testing of GoogleRpcStatus protobuf extraction from trailers.
Public Class Methods
new(encoded_rpc_status)
click to toggle source
# File src/ruby/spec/google_rpc_status_utils_spec.rb, line 134 def initialize(encoded_rpc_status) @encoded_rpc_status = encoded_rpc_status end
Public Instance Methods
an_rpc(_, _)
click to toggle source
# File src/ruby/spec/google_rpc_status_utils_spec.rb, line 138 def an_rpc(_, _) # TODO: create a server-side utility API for sending a google rpc status. # Applications are not expected to set the grpc-status-details-bin # ("grpc"-fixed and reserved for library use) manually. # Doing so here is only for testing of the client-side api for extracting # a google rpc status, which is useful # when the interacting with a server that does fill in this trailer. fail GRPC::Unknown.new('test message', 'grpc-status-details-bin' => @encoded_rpc_status) end