Skip to content

Commit

Permalink
chore: update integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ohmayr committed Aug 11, 2023
1 parent 4a8fad2 commit 4d2ddb5
Show file tree
Hide file tree
Showing 153 changed files with 51,421 additions and 16,849 deletions.
3 changes: 1 addition & 2 deletions BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,5 @@ py_binary(
requirement("pypandoc"),
requirement("PyYAML"),
requirement("grpc-google-iam-v1"),
]
],
)

5 changes: 4 additions & 1 deletion rules_python_gapic/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
exports_files(["test.py", "pytest.py"])
exports_files([
"test.py",
"pytest.py",
])
13 changes: 5 additions & 8 deletions tests/integration/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ load(
"@gapic_generator_python//rules_python_gapic:py_gapic.bzl",
"py_gapic_library",
)
load(
"@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl",
"py_gapic_assembly_pkg",
)
load(
"@gapic_generator_python//rules_python_gapic/test:integration_test.bzl",
"golden_update",
Expand All @@ -16,8 +12,6 @@ load(
"py_proto_library",
)

load("@rules_proto//proto:defs.bzl", "proto_library")

package(default_visibility = ["//visibility:public"])

####################################################
Expand Down Expand Up @@ -103,7 +97,7 @@ py_gapic_library(
],
service_yaml = "eventarc_v1.yaml",
transport = "grpc+rest",
deps = [":iam_policy_py_proto"]
deps = [":iam_policy_py_proto"],
)

py_test(
Expand All @@ -128,7 +122,10 @@ py_gapic_library(
"python-gapic-name=logging",
"autogen-snippets",
],
transport = "grpc+rest",
# rest is not generated because of the following isssue:
# REST unit test test_update_settings_rest_flattened in logging_v2 fails #1728
# google/logging/v2https://github.com/googleapis/googleapis/blob/e85662e798a0a9495a035839f66d0c037c481e2c/google/logging/v2/BUILD.bazel#L201
transport = "grpc",
)

py_test(
Expand Down
72 changes: 72 additions & 0 deletions tests/integration/goldens/asset/google/cloud/asset/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,89 +21,161 @@
from google.cloud.asset_v1.services.asset_service.client import AssetServiceClient
from google.cloud.asset_v1.services.asset_service.async_client import AssetServiceAsyncClient

from google.cloud.asset_v1.types.asset_service import AnalyzeIamPolicyLongrunningMetadata
from google.cloud.asset_v1.types.asset_service import AnalyzeIamPolicyLongrunningRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeIamPolicyLongrunningResponse
from google.cloud.asset_v1.types.asset_service import AnalyzeIamPolicyRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeIamPolicyResponse
from google.cloud.asset_v1.types.asset_service import AnalyzeMoveRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeMoveResponse
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPoliciesRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPoliciesResponse
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPolicyGovernedAssetsRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPolicyGovernedAssetsResponse
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPolicyGovernedContainersRequest
from google.cloud.asset_v1.types.asset_service import AnalyzeOrgPolicyGovernedContainersResponse
from google.cloud.asset_v1.types.asset_service import AnalyzerOrgPolicy
from google.cloud.asset_v1.types.asset_service import AnalyzerOrgPolicyConstraint
from google.cloud.asset_v1.types.asset_service import BatchGetAssetsHistoryRequest
from google.cloud.asset_v1.types.asset_service import BatchGetAssetsHistoryResponse
from google.cloud.asset_v1.types.asset_service import BatchGetEffectiveIamPoliciesRequest
from google.cloud.asset_v1.types.asset_service import BatchGetEffectiveIamPoliciesResponse
from google.cloud.asset_v1.types.asset_service import BigQueryDestination
from google.cloud.asset_v1.types.asset_service import CreateFeedRequest
from google.cloud.asset_v1.types.asset_service import CreateSavedQueryRequest
from google.cloud.asset_v1.types.asset_service import DeleteFeedRequest
from google.cloud.asset_v1.types.asset_service import DeleteSavedQueryRequest
from google.cloud.asset_v1.types.asset_service import ExportAssetsRequest
from google.cloud.asset_v1.types.asset_service import ExportAssetsResponse
from google.cloud.asset_v1.types.asset_service import Feed
from google.cloud.asset_v1.types.asset_service import FeedOutputConfig
from google.cloud.asset_v1.types.asset_service import GcsDestination
from google.cloud.asset_v1.types.asset_service import GcsOutputResult
from google.cloud.asset_v1.types.asset_service import GetFeedRequest
from google.cloud.asset_v1.types.asset_service import GetSavedQueryRequest
from google.cloud.asset_v1.types.asset_service import IamPolicyAnalysisOutputConfig
from google.cloud.asset_v1.types.asset_service import IamPolicyAnalysisQuery
from google.cloud.asset_v1.types.asset_service import ListAssetsRequest
from google.cloud.asset_v1.types.asset_service import ListAssetsResponse
from google.cloud.asset_v1.types.asset_service import ListFeedsRequest
from google.cloud.asset_v1.types.asset_service import ListFeedsResponse
from google.cloud.asset_v1.types.asset_service import ListSavedQueriesRequest
from google.cloud.asset_v1.types.asset_service import ListSavedQueriesResponse
from google.cloud.asset_v1.types.asset_service import MoveAnalysis
from google.cloud.asset_v1.types.asset_service import MoveAnalysisResult
from google.cloud.asset_v1.types.asset_service import MoveImpact
from google.cloud.asset_v1.types.asset_service import OutputConfig
from google.cloud.asset_v1.types.asset_service import OutputResult
from google.cloud.asset_v1.types.asset_service import PartitionSpec
from google.cloud.asset_v1.types.asset_service import PubsubDestination
from google.cloud.asset_v1.types.asset_service import QueryAssetsOutputConfig
from google.cloud.asset_v1.types.asset_service import QueryAssetsRequest
from google.cloud.asset_v1.types.asset_service import QueryAssetsResponse
from google.cloud.asset_v1.types.asset_service import QueryResult
from google.cloud.asset_v1.types.asset_service import SavedQuery
from google.cloud.asset_v1.types.asset_service import SearchAllIamPoliciesRequest
from google.cloud.asset_v1.types.asset_service import SearchAllIamPoliciesResponse
from google.cloud.asset_v1.types.asset_service import SearchAllResourcesRequest
from google.cloud.asset_v1.types.asset_service import SearchAllResourcesResponse
from google.cloud.asset_v1.types.asset_service import TableFieldSchema
from google.cloud.asset_v1.types.asset_service import TableSchema
from google.cloud.asset_v1.types.asset_service import UpdateFeedRequest
from google.cloud.asset_v1.types.asset_service import UpdateSavedQueryRequest
from google.cloud.asset_v1.types.asset_service import ContentType
from google.cloud.asset_v1.types.assets import Asset
from google.cloud.asset_v1.types.assets import AttachedResource
from google.cloud.asset_v1.types.assets import ConditionEvaluation
from google.cloud.asset_v1.types.assets import IamPolicyAnalysisResult
from google.cloud.asset_v1.types.assets import IamPolicyAnalysisState
from google.cloud.asset_v1.types.assets import IamPolicySearchResult
from google.cloud.asset_v1.types.assets import RelatedAsset
from google.cloud.asset_v1.types.assets import RelatedAssets
from google.cloud.asset_v1.types.assets import RelatedResource
from google.cloud.asset_v1.types.assets import RelatedResources
from google.cloud.asset_v1.types.assets import RelationshipAttributes
from google.cloud.asset_v1.types.assets import Resource
from google.cloud.asset_v1.types.assets import ResourceSearchResult
from google.cloud.asset_v1.types.assets import TemporalAsset
from google.cloud.asset_v1.types.assets import TimeWindow
from google.cloud.asset_v1.types.assets import VersionedResource

__all__ = ('AssetServiceClient',
'AssetServiceAsyncClient',
'AnalyzeIamPolicyLongrunningMetadata',
'AnalyzeIamPolicyLongrunningRequest',
'AnalyzeIamPolicyLongrunningResponse',
'AnalyzeIamPolicyRequest',
'AnalyzeIamPolicyResponse',
'AnalyzeMoveRequest',
'AnalyzeMoveResponse',
'AnalyzeOrgPoliciesRequest',
'AnalyzeOrgPoliciesResponse',
'AnalyzeOrgPolicyGovernedAssetsRequest',
'AnalyzeOrgPolicyGovernedAssetsResponse',
'AnalyzeOrgPolicyGovernedContainersRequest',
'AnalyzeOrgPolicyGovernedContainersResponse',
'AnalyzerOrgPolicy',
'AnalyzerOrgPolicyConstraint',
'BatchGetAssetsHistoryRequest',
'BatchGetAssetsHistoryResponse',
'BatchGetEffectiveIamPoliciesRequest',
'BatchGetEffectiveIamPoliciesResponse',
'BigQueryDestination',
'CreateFeedRequest',
'CreateSavedQueryRequest',
'DeleteFeedRequest',
'DeleteSavedQueryRequest',
'ExportAssetsRequest',
'ExportAssetsResponse',
'Feed',
'FeedOutputConfig',
'GcsDestination',
'GcsOutputResult',
'GetFeedRequest',
'GetSavedQueryRequest',
'IamPolicyAnalysisOutputConfig',
'IamPolicyAnalysisQuery',
'ListAssetsRequest',
'ListAssetsResponse',
'ListFeedsRequest',
'ListFeedsResponse',
'ListSavedQueriesRequest',
'ListSavedQueriesResponse',
'MoveAnalysis',
'MoveAnalysisResult',
'MoveImpact',
'OutputConfig',
'OutputResult',
'PartitionSpec',
'PubsubDestination',
'QueryAssetsOutputConfig',
'QueryAssetsRequest',
'QueryAssetsResponse',
'QueryResult',
'SavedQuery',
'SearchAllIamPoliciesRequest',
'SearchAllIamPoliciesResponse',
'SearchAllResourcesRequest',
'SearchAllResourcesResponse',
'TableFieldSchema',
'TableSchema',
'UpdateFeedRequest',
'UpdateSavedQueryRequest',
'ContentType',
'Asset',
'AttachedResource',
'ConditionEvaluation',
'IamPolicyAnalysisResult',
'IamPolicyAnalysisState',
'IamPolicySearchResult',
'RelatedAsset',
'RelatedAssets',
'RelatedResource',
'RelatedResources',
'RelationshipAttributes',
'Resource',
'ResourceSearchResult',
'TemporalAsset',
'TimeWindow',
'VersionedResource',
)
72 changes: 72 additions & 0 deletions tests/integration/goldens/asset/google/cloud/asset_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,70 +21,123 @@
from .services.asset_service import AssetServiceClient
from .services.asset_service import AssetServiceAsyncClient

from .types.asset_service import AnalyzeIamPolicyLongrunningMetadata
from .types.asset_service import AnalyzeIamPolicyLongrunningRequest
from .types.asset_service import AnalyzeIamPolicyLongrunningResponse
from .types.asset_service import AnalyzeIamPolicyRequest
from .types.asset_service import AnalyzeIamPolicyResponse
from .types.asset_service import AnalyzeMoveRequest
from .types.asset_service import AnalyzeMoveResponse
from .types.asset_service import AnalyzeOrgPoliciesRequest
from .types.asset_service import AnalyzeOrgPoliciesResponse
from .types.asset_service import AnalyzeOrgPolicyGovernedAssetsRequest
from .types.asset_service import AnalyzeOrgPolicyGovernedAssetsResponse
from .types.asset_service import AnalyzeOrgPolicyGovernedContainersRequest
from .types.asset_service import AnalyzeOrgPolicyGovernedContainersResponse
from .types.asset_service import AnalyzerOrgPolicy
from .types.asset_service import AnalyzerOrgPolicyConstraint
from .types.asset_service import BatchGetAssetsHistoryRequest
from .types.asset_service import BatchGetAssetsHistoryResponse
from .types.asset_service import BatchGetEffectiveIamPoliciesRequest
from .types.asset_service import BatchGetEffectiveIamPoliciesResponse
from .types.asset_service import BigQueryDestination
from .types.asset_service import CreateFeedRequest
from .types.asset_service import CreateSavedQueryRequest
from .types.asset_service import DeleteFeedRequest
from .types.asset_service import DeleteSavedQueryRequest
from .types.asset_service import ExportAssetsRequest
from .types.asset_service import ExportAssetsResponse
from .types.asset_service import Feed
from .types.asset_service import FeedOutputConfig
from .types.asset_service import GcsDestination
from .types.asset_service import GcsOutputResult
from .types.asset_service import GetFeedRequest
from .types.asset_service import GetSavedQueryRequest
from .types.asset_service import IamPolicyAnalysisOutputConfig
from .types.asset_service import IamPolicyAnalysisQuery
from .types.asset_service import ListAssetsRequest
from .types.asset_service import ListAssetsResponse
from .types.asset_service import ListFeedsRequest
from .types.asset_service import ListFeedsResponse
from .types.asset_service import ListSavedQueriesRequest
from .types.asset_service import ListSavedQueriesResponse
from .types.asset_service import MoveAnalysis
from .types.asset_service import MoveAnalysisResult
from .types.asset_service import MoveImpact
from .types.asset_service import OutputConfig
from .types.asset_service import OutputResult
from .types.asset_service import PartitionSpec
from .types.asset_service import PubsubDestination
from .types.asset_service import QueryAssetsOutputConfig
from .types.asset_service import QueryAssetsRequest
from .types.asset_service import QueryAssetsResponse
from .types.asset_service import QueryResult
from .types.asset_service import SavedQuery
from .types.asset_service import SearchAllIamPoliciesRequest
from .types.asset_service import SearchAllIamPoliciesResponse
from .types.asset_service import SearchAllResourcesRequest
from .types.asset_service import SearchAllResourcesResponse
from .types.asset_service import TableFieldSchema
from .types.asset_service import TableSchema
from .types.asset_service import UpdateFeedRequest
from .types.asset_service import UpdateSavedQueryRequest
from .types.asset_service import ContentType
from .types.assets import Asset
from .types.assets import AttachedResource
from .types.assets import ConditionEvaluation
from .types.assets import IamPolicyAnalysisResult
from .types.assets import IamPolicyAnalysisState
from .types.assets import IamPolicySearchResult
from .types.assets import RelatedAsset
from .types.assets import RelatedAssets
from .types.assets import RelatedResource
from .types.assets import RelatedResources
from .types.assets import RelationshipAttributes
from .types.assets import Resource
from .types.assets import ResourceSearchResult
from .types.assets import TemporalAsset
from .types.assets import TimeWindow
from .types.assets import VersionedResource

__all__ = (
'AssetServiceAsyncClient',
'AnalyzeIamPolicyLongrunningMetadata',
'AnalyzeIamPolicyLongrunningRequest',
'AnalyzeIamPolicyLongrunningResponse',
'AnalyzeIamPolicyRequest',
'AnalyzeIamPolicyResponse',
'AnalyzeMoveRequest',
'AnalyzeMoveResponse',
'AnalyzeOrgPoliciesRequest',
'AnalyzeOrgPoliciesResponse',
'AnalyzeOrgPolicyGovernedAssetsRequest',
'AnalyzeOrgPolicyGovernedAssetsResponse',
'AnalyzeOrgPolicyGovernedContainersRequest',
'AnalyzeOrgPolicyGovernedContainersResponse',
'AnalyzerOrgPolicy',
'AnalyzerOrgPolicyConstraint',
'Asset',
'AssetServiceClient',
'AttachedResource',
'BatchGetAssetsHistoryRequest',
'BatchGetAssetsHistoryResponse',
'BatchGetEffectiveIamPoliciesRequest',
'BatchGetEffectiveIamPoliciesResponse',
'BigQueryDestination',
'ConditionEvaluation',
'ContentType',
'CreateFeedRequest',
'CreateSavedQueryRequest',
'DeleteFeedRequest',
'DeleteSavedQueryRequest',
'ExportAssetsRequest',
'ExportAssetsResponse',
'Feed',
'FeedOutputConfig',
'GcsDestination',
'GcsOutputResult',
'GetFeedRequest',
'GetSavedQueryRequest',
'IamPolicyAnalysisOutputConfig',
'IamPolicyAnalysisQuery',
'IamPolicyAnalysisResult',
Expand All @@ -94,17 +147,36 @@
'ListAssetsResponse',
'ListFeedsRequest',
'ListFeedsResponse',
'ListSavedQueriesRequest',
'ListSavedQueriesResponse',
'MoveAnalysis',
'MoveAnalysisResult',
'MoveImpact',
'OutputConfig',
'OutputResult',
'PartitionSpec',
'PubsubDestination',
'QueryAssetsOutputConfig',
'QueryAssetsRequest',
'QueryAssetsResponse',
'QueryResult',
'RelatedAsset',
'RelatedAssets',
'RelatedResource',
'RelatedResources',
'RelationshipAttributes',
'Resource',
'ResourceSearchResult',
'SavedQuery',
'SearchAllIamPoliciesRequest',
'SearchAllIamPoliciesResponse',
'SearchAllResourcesRequest',
'SearchAllResourcesResponse',
'TableFieldSchema',
'TableSchema',
'TemporalAsset',
'TimeWindow',
'UpdateFeedRequest',
'UpdateSavedQueryRequest',
'VersionedResource',
)
Loading

0 comments on commit 4d2ddb5

Please sign in to comment.