googleapis/gapic-generator-ruby

Generated test always fails if an implicit routing header references a field in a sub-sub(-sub)*message

viacheslav-rostovtsev opened this issue · 1 comments

Given: https://github.com/googleapis/gapic-showcase/blob/0b27eb4aa1930f018c49fa5dba4812809149068d/schema/google/showcase/v1beta1/compliance.proto#L72
The generator will generate

 header_params = {
              "info.f_string" => request.info.f_string,
              "info.f_child.f_string" => request.info.f_child.f_string,
              "info.f_bool" => request.info.f_bool
            }

but our mock for request is only 1-level deep, we do not mock subfields info if those are messages.

This leads to test failing with

NoMethodError: undefined method `f_string' for nil:NilClass

Expected behaviour: test passes.