Skip to content

Commit

Permalink
fix: resolve issue where rest test appears in grpc-only client (#1343)
Browse files Browse the repository at this point in the history
* fix: fixes bug with generated test.

* chore: update integration tests.

* chore: fix bug.
  • Loading branch information
atulep committed Jul 4, 2022
1 parent 2ef2a44 commit 22cd2ca
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@ def test_{{ service.name|snake_case }}_transport_auth_adc(transport_class):
)


{% if 'grpc' in opts.transport and 'rest' in opts.transport %}
@pytest.mark.parametrize(
"transport_class",
[
Expand All @@ -937,6 +938,22 @@ def test_{{ service.name|snake_case }}_transport_auth_adc(transport_class):
transports.{{ service.name }}RestTransport,
],
)
{% elif 'grpc' in opts.transport %}
@pytest.mark.parametrize(
"transport_class",
[
transports.{{ service.name }}GrpcTransport,
transports.{{ service.name }}GrpcAsyncIOTransport,
],
)
{% elif 'rest' in opts.transport %}
@pytest.mark.parametrize(
"transport_class",
[
transports.{{ service.name }}RestTransport,
],
)
{% endif %}
def test_{{ service.name|snake_case }}_transport_auth_gdch_credentials(transport_class):
host = 'https://language.com'
api_audience_tests = [None, 'https://language2.com']
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3816,7 +3816,6 @@ def test_asset_service_transport_auth_adc(transport_class):
[
transports.AssetServiceGrpcTransport,
transports.AssetServiceGrpcAsyncIOTransport,
transports.AssetServiceRestTransport,
],
)
def test_asset_service_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1762,7 +1762,6 @@ def test_iam_credentials_transport_auth_adc(transport_class):
[
transports.IAMCredentialsGrpcTransport,
transports.IAMCredentialsGrpcAsyncIOTransport,
transports.IAMCredentialsRestTransport,
],
)
def test_iam_credentials_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2152,7 +2152,6 @@ def test_eventarc_transport_auth_adc(transport_class):
[
transports.EventarcGrpcTransport,
transports.EventarcGrpcAsyncIOTransport,
transports.EventarcRestTransport,
],
)
def test_eventarc_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6186,7 +6186,6 @@ def test_config_service_v2_transport_auth_adc(transport_class):
[
transports.ConfigServiceV2GrpcTransport,
transports.ConfigServiceV2GrpcAsyncIOTransport,
transports.ConfigServiceV2RestTransport,
],
)
def test_config_service_v2_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2307,7 +2307,6 @@ def test_logging_service_v2_transport_auth_adc(transport_class):
[
transports.LoggingServiceV2GrpcTransport,
transports.LoggingServiceV2GrpcAsyncIOTransport,
transports.LoggingServiceV2RestTransport,
],
)
def test_logging_service_v2_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2158,7 +2158,6 @@ def test_metrics_service_v2_transport_auth_adc(transport_class):
[
transports.MetricsServiceV2GrpcTransport,
transports.MetricsServiceV2GrpcAsyncIOTransport,
transports.MetricsServiceV2RestTransport,
],
)
def test_metrics_service_v2_transport_auth_gdch_credentials(transport_class):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3142,7 +3142,6 @@ def test_cloud_redis_transport_auth_adc(transport_class):
[
transports.CloudRedisGrpcTransport,
transports.CloudRedisGrpcAsyncIOTransport,
transports.CloudRedisRestTransport,
],
)
def test_cloud_redis_transport_auth_gdch_credentials(transport_class):
Expand Down

0 comments on commit 22cd2ca

Please sign in to comment.