diff --git a/packages/google-cloud-artifact-registry/CONTRIBUTING.rst b/packages/google-cloud-artifact-registry/CONTRIBUTING.rst index 8d91ea49b23f..983eba978a12 100644 --- a/packages/google-cloud-artifact-registry/CONTRIBUTING.rst +++ b/packages/google-cloud-artifact-registry/CONTRIBUTING.rst @@ -143,12 +143,12 @@ Running System Tests $ nox -s system # Run a single system test - $ nox -s system- -- -k + $ nox -s system-3.11 -- -k .. note:: - System tests are only configured to run under Python. + System tests are only configured to run under Python 3.8, 3.9, 3.10 and 3.11. For expediency, we do not run them in older versions of Python 3. This alone will not run the tests. You'll need to change some local diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py index f9e85c87b4d6..360a0d13ebdd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py index f9e85c87b4d6..360a0d13ebdd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py index 92f6ba8bebac..a1ad7b8ab3bf 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/async_client.py @@ -47,7 +47,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import struct_pb2 # type: ignore @@ -1597,6 +1597,7 @@ async def sample_create_repository(): # Initialize request argument(s) request = artifactregistry_v1.CreateRepositoryRequest( parent="parent_value", + repository_id="repository_id_value", ) # Make the request @@ -1999,6 +2000,7 @@ async def sample_list_packages(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPackagesAsyncPager: The response from listing packages. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2337,6 +2339,7 @@ async def sample_list_versions(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListVersionsAsyncPager: The response from listing versions. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2674,6 +2677,7 @@ async def sample_list_files(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListFilesAsyncPager: The response from listing files. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2888,6 +2892,7 @@ async def sample_list_tags(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListTagsAsyncPager: The response from listing tags. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py index 49d7c3bcecea..2e916699e4b7 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/client.py @@ -51,7 +51,7 @@ from google.cloud.location import locations_pb2 # type: ignore from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore from google.protobuf import struct_pb2 # type: ignore @@ -2070,6 +2070,7 @@ def sample_create_repository(): # Initialize request argument(s) request = artifactregistry_v1.CreateRepositoryRequest( parent="parent_value", + repository_id="repository_id_value", ) # Make the request @@ -2472,6 +2473,7 @@ def sample_list_packages(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListPackagesPager: The response from listing packages. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2810,6 +2812,7 @@ def sample_list_versions(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListVersionsPager: The response from listing versions. + Iterating over this object will yield results and resolve additional pages automatically. @@ -3147,6 +3150,7 @@ def sample_list_files(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListFilesPager: The response from listing files. + Iterating over this object will yield results and resolve additional pages automatically. @@ -3361,6 +3365,7 @@ def sample_list_tags(): Returns: google.cloud.artifactregistry_v1.services.artifact_registry.pagers.ListTagsPager: The response from listing tags. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/transports/rest.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/transports/rest.py index b1773eb55b19..e00ce2198715 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/transports/rest.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/services/artifact_registry/transports/rest.py @@ -33,7 +33,6 @@ from google.auth.transport.grpc import SslCredentials # type: ignore from google.auth.transport.requests import AuthorizedSession # type: ignore from google.cloud.location import locations_pb2 # type: ignore -from google.longrunning import operations_pb2 from google.protobuf import json_format import grpc # type: ignore from requests import __version__ as requests_version @@ -1334,7 +1333,9 @@ class _CreateRepository(ArtifactRegistryRestStub): def __hash__(self): return hash("CreateRepository") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { + "repositoryId": "", + } @classmethod def _get_unset_required_fields(cls, message_dict): diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/settings.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/settings.py index 36b3775b1253..2b7cbdaba590 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/settings.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/settings.py @@ -36,6 +36,7 @@ class ProjectSettings(proto.Message): Attributes: name (str): The name of the project's settings. + Always of the form: projects/{project-id}/projectSettings diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/tag.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/tag.py index c3af5f92b72d..0a5139472cd5 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/tag.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/tag.py @@ -48,7 +48,6 @@ class Tag(proto.Message): version (str): The name of the version the tag refers to, for example: - "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/vpcsc_config.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/vpcsc_config.py index 3d0a86c541b0..e48cabe16c50 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/vpcsc_config.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1/types/vpcsc_config.py @@ -36,9 +36,11 @@ class VPCSCConfig(proto.Message): Attributes: name (str): The name of the project's VPC SC Config. + Always of the form: projects/{projectID}/locations/{location}/vpcscConfig + In update request: never set In response: always set vpcsc_policy (google.cloud.artifactregistry_v1.types.VPCSCConfig.VPCSCPolicy): diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py index f9e85c87b4d6..360a0d13ebdd 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.8.3" # {x-release-please-version} +__version__ = "0.0.0" # {x-release-please-version} diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py index d6b214190628..7088e9555700 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/async_client.py @@ -1134,6 +1134,7 @@ async def sample_list_packages(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListPackagesAsyncPager: The response from listing packages. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1493,6 +1494,7 @@ async def sample_list_versions(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListVersionsAsyncPager: The response from listing versions. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1842,7 +1844,6 @@ async def sample_list_files(): parent (:class:`str`): The name of the repository whose files will be listed. For example: - "projects/p1/locations/us-central1/repositories/repo1 This corresponds to the ``parent`` field @@ -1857,6 +1858,7 @@ async def sample_list_files(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListFilesAsyncPager: The response from listing files. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2086,6 +2088,7 @@ async def sample_list_tags(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListTagsAsyncPager: The response from listing tags. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py index 981669886f57..a3be0d9aa253 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/services/artifact_registry/client.py @@ -1461,6 +1461,7 @@ def sample_list_packages(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListPackagesPager: The response from listing packages. + Iterating over this object will yield results and resolve additional pages automatically. @@ -1793,6 +1794,7 @@ def sample_list_versions(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListVersionsPager: The response from listing versions. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2115,7 +2117,6 @@ def sample_list_files(): parent (str): The name of the repository whose files will be listed. For example: - "projects/p1/locations/us-central1/repositories/repo1 This corresponds to the ``parent`` field @@ -2130,6 +2131,7 @@ def sample_list_files(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListFilesPager: The response from listing files. + Iterating over this object will yield results and resolve additional pages automatically. @@ -2341,6 +2343,7 @@ def sample_list_tags(): Returns: google.cloud.artifactregistry_v1beta2.services.artifact_registry.pagers.ListTagsPager: The response from listing tags. + Iterating over this object will yield results and resolve additional pages automatically. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/file.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/file.py index 100568de38f5..6f6229d91013 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/file.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/file.py @@ -128,7 +128,6 @@ class ListFilesRequest(proto.Message): parent (str): The name of the repository whose files will be listed. For example: - "projects/p1/locations/us-central1/repositories/repo1 filter (str): An expression for filtering the results of the request. diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/settings.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/settings.py index 2e8a25762f6e..c10e85e02f12 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/settings.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/settings.py @@ -36,6 +36,7 @@ class ProjectSettings(proto.Message): Attributes: name (str): The name of the project's settings. + Always of the form: projects/{project-id}/projectSettings diff --git a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/tag.py b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/tag.py index 94249dfa534d..99631faa5b4e 100644 --- a/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/tag.py +++ b/packages/google-cloud-artifact-registry/google/cloud/artifactregistry_v1beta2/types/tag.py @@ -48,7 +48,6 @@ class Tag(proto.Message): version (str): The name of the version the tag refers to, for example: - "projects/p1/locations/us-central1/repositories/repo1/packages/pkg1/versions/sha256:5243811" If the package or version ID parts contain slashes, the slashes are escaped. diff --git a/packages/google-cloud-artifact-registry/noxfile.py b/packages/google-cloud-artifact-registry/noxfile.py index 9a2acd8b6787..be54712bfa8f 100644 --- a/packages/google-cloud-artifact-registry/noxfile.py +++ b/packages/google-cloud-artifact-registry/noxfile.py @@ -46,7 +46,7 @@ UNIT_TEST_EXTRAS = [] UNIT_TEST_EXTRAS_BY_PYTHON = {} -SYSTEM_TEST_PYTHON_VERSIONS = [] +SYSTEM_TEST_PYTHON_VERSIONS = ["3.8", "3.9", "3.10", "3.11"] SYSTEM_TEST_STANDARD_DEPENDENCIES = [ "mock", "pytest", @@ -405,24 +405,3 @@ def prerelease_deps(session): session.run("python", "-c", "import google.auth; print(google.auth.__version__)") session.run("py.test", "tests/unit") - - system_test_path = os.path.join("tests", "system.py") - system_test_folder_path = os.path.join("tests", "system") - - # Only run system tests if found. - if os.path.exists(system_test_path): - session.run( - "py.test", - "--verbose", - f"--junitxml=system_{session.python}_sponge_log.xml", - system_test_path, - *session.posargs, - ) - if os.path.exists(system_test_folder_path): - session.run( - "py.test", - "--verbose", - f"--junitxml=system_{session.python}_sponge_log.xml", - system_test_folder_path, - *session.posargs, - ) diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py index 9789c8dd4236..0ff24e6db26f 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_async.py @@ -41,6 +41,7 @@ async def sample_create_repository(): # Initialize request argument(s) request = artifactregistry_v1.CreateRepositoryRequest( parent="parent_value", + repository_id="repository_id_value", ) # Make the request diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py index e9e9bb9c4202..9baaebe3061d 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/artifactregistry_v1_generated_artifact_registry_create_repository_sync.py @@ -41,6 +41,7 @@ def sample_create_repository(): # Initialize request argument(s) request = artifactregistry_v1.CreateRepositoryRequest( parent="parent_value", + repository_id="repository_id_value", ) # Make the request diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json index a7c02e7ee9da..787e46d32136 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-artifact-registry", - "version": "1.8.3" + "version": "0.1.0" }, "snippets": [ { @@ -68,12 +68,12 @@ "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_async", "segments": [ { - "end": 55, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 56, "start": 27, "type": "SHORT" }, @@ -83,18 +83,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 46, + "end": 53, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], @@ -156,12 +156,12 @@ "regionTag": "artifactregistry_v1_generated_ArtifactRegistry_CreateRepository_sync", "segments": [ { - "end": 55, + "end": 56, "start": 27, "type": "FULL" }, { - "end": 55, + "end": 56, "start": 27, "type": "SHORT" }, @@ -171,18 +171,18 @@ "type": "CLIENT_INITIALIZATION" }, { - "end": 45, + "end": 46, "start": 41, "type": "REQUEST_INITIALIZATION" }, { - "end": 52, - "start": 46, + "end": 53, + "start": 47, "type": "REQUEST_EXECUTION" }, { - "end": 56, - "start": 53, + "end": 57, + "start": 54, "type": "RESPONSE_HANDLING" } ], diff --git a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json index 464ea51076e3..c22cba2a0008 100644 --- a/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json +++ b/packages/google-cloud-artifact-registry/samples/generated_samples/snippet_metadata_google.devtools.artifactregistry.v1beta2.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-artifact-registry", - "version": "1.8.3" + "version": "0.1.0" }, "snippets": [ { diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py index 5ce845968992..ff14995f9c1e 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1/test_artifact_registry.py @@ -45,7 +45,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore @@ -14089,6 +14089,7 @@ def test_create_repository_rest_required_fields( request_init = {} request_init["parent"] = "" + request_init["repository_id"] = "" request = request_type(**request_init) pb_request = request_type.pb(request) jsonified_request = json.loads( @@ -14100,6 +14101,7 @@ def test_create_repository_rest_required_fields( ) # verify fields with default values are dropped + assert "repositoryId" not in jsonified_request unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() @@ -14107,8 +14109,11 @@ def test_create_repository_rest_required_fields( jsonified_request.update(unset_fields) # verify required fields with default values are now present + assert "repositoryId" in jsonified_request + assert jsonified_request["repositoryId"] == request_init["repository_id"] jsonified_request["parent"] = "parent_value" + jsonified_request["repositoryId"] = "repository_id_value" unset_fields = transport_class( credentials=ga_credentials.AnonymousCredentials() @@ -14120,6 +14125,8 @@ def test_create_repository_rest_required_fields( # verify required fields with non-default values are left alone assert "parent" in jsonified_request assert jsonified_request["parent"] == "parent_value" + assert "repositoryId" in jsonified_request + assert jsonified_request["repositoryId"] == "repository_id_value" client = ArtifactRegistryClient( credentials=ga_credentials.AnonymousCredentials(), @@ -14155,7 +14162,13 @@ def test_create_repository_rest_required_fields( response = client.create_repository(request) - expected_params = [("$alt", "json;enum-encoding=int")] + expected_params = [ + ( + "repositoryId", + "", + ), + ("$alt", "json;enum-encoding=int"), + ] actual_params = req.call_args.kwargs["params"] assert expected_params == actual_params @@ -14166,7 +14179,16 @@ def test_create_repository_rest_unset_required_fields(): ) unset_fields = transport.create_repository._get_unset_required_fields({}) - assert set(unset_fields) == (set(("repositoryId",)) & set(("parent",))) + assert set(unset_fields) == ( + set(("repositoryId",)) + & set( + ( + "parent", + "repositoryId", + "repository", + ) + ) + ) @pytest.mark.parametrize("null_interceptor", [True, False]) diff --git a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py index b10d2a9657ac..5dc93b886348 100644 --- a/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py +++ b/packages/google-cloud-artifact-registry/tests/unit/gapic/artifactregistry_v1beta2/test_artifact_registry.py @@ -45,7 +45,7 @@ from google.iam.v1 import iam_policy_pb2 # type: ignore from google.iam.v1 import options_pb2 # type: ignore from google.iam.v1 import policy_pb2 # type: ignore -from google.longrunning import operations_pb2 +from google.longrunning import operations_pb2 # type: ignore from google.oauth2 import service_account from google.protobuf import empty_pb2 # type: ignore from google.protobuf import field_mask_pb2 # type: ignore