Skip to content

Commit f9ccd86

Browse files
authored
test: Add service config to showcase (#1820)
Co-authored-by: omair <omairn@google.com>
1 parent c99ed8b commit f9ccd86

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

packages/gapic-generator/noxfile.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ def fragment_alternative_templates(session):
178178
def showcase_library(
179179
session, templates="DEFAULT", other_opts: typing.Iterable[str] = (),
180180
include_service_yaml=True,
181+
retry_config=True,
181182
):
182183
"""Install the generated library into the session for showcase tests."""
183184

@@ -218,11 +219,23 @@ def showcase_library(
218219
external=True,
219220
silent=True,
220221
)
222+
if retry_config:
223+
session.run(
224+
"curl",
225+
"https://github.com/googleapis/gapic-showcase/releases/"
226+
f"download/v{showcase_version}/"
227+
f"showcase_grpc_service_config.json",
228+
"-L",
229+
"--output",
230+
path.join(tmp_dir, "showcase_grpc_service_config.json"),
231+
external=True,
232+
silent=True,
233+
)
221234
# Write out a client library for Showcase.
222235
template_opt = f"python-gapic-templates={templates}"
223236
opts = "--python_gapic_opt="
224-
if include_service_yaml:
225-
opts += ",".join(other_opts + (f"{template_opt}", "transport=grpc+rest", f"service-yaml={tmp_dir}/showcase_v1beta1.yaml"))
237+
if include_service_yaml and retry_config:
238+
opts += ",".join(other_opts + (f"{template_opt}", "transport=grpc+rest", f"service-yaml={tmp_dir}/showcase_v1beta1.yaml", f"retry-config={tmp_dir}/showcase_grpc_service_config.json"))
226239
else:
227240
opts += ",".join(other_opts + (f"{template_opt}", "transport=grpc+rest",))
228241
cmd_tup = (

0 commit comments

Comments
 (0)