Class MockArtifactRegistryConnection (2.18.0)

A class to mock ArtifactRegistryConnection.

Application developers may want to test their code with simulated responses, including errors, from an object of type ArtifactRegistryClient. To do so, construct an object of type ArtifactRegistryClient with an instance of this class. Then use the Google Test framework functions to program the behavior of this mock.

See Also

This example for how to test your application with GoogleTest. While the example showcases types from the BigQuery library, the underlying principles apply for any pair of *Client and *Connection.

Functions

virtual options()

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Returns
Type Description
Options

virtual ListDockerImages(google::devtools::artifactregistry::v1::ListDockerImagesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListDockerImagesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::DockerImage >

virtual GetDockerImage(google::devtools::artifactregistry::v1::GetDockerImageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetDockerImageRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::DockerImage >

virtual ListMavenArtifacts(google::devtools::artifactregistry::v1::ListMavenArtifactsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListMavenArtifactsRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::MavenArtifact >

virtual GetMavenArtifact(google::devtools::artifactregistry::v1::GetMavenArtifactRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetMavenArtifactRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::MavenArtifact >

virtual ListNpmPackages(google::devtools::artifactregistry::v1::ListNpmPackagesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListNpmPackagesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::NpmPackage >

virtual GetNpmPackage(google::devtools::artifactregistry::v1::GetNpmPackageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetNpmPackageRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::NpmPackage >

virtual ListPythonPackages(google::devtools::artifactregistry::v1::ListPythonPackagesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListPythonPackagesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::PythonPackage >

virtual GetPythonPackage(google::devtools::artifactregistry::v1::GetPythonPackageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetPythonPackageRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::PythonPackage >

virtual ImportAptArtifacts(google::devtools::artifactregistry::v1::ImportAptArtifactsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ImportAptArtifactsRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::ImportAptArtifactsResponse > >

virtual ImportYumArtifacts(google::devtools::artifactregistry::v1::ImportYumArtifactsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ImportYumArtifactsRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::ImportYumArtifactsResponse > >

virtual ListRepositories(google::devtools::artifactregistry::v1::ListRepositoriesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListRepositoriesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::Repository >

virtual GetRepository(google::devtools::artifactregistry::v1::GetRepositoryRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetRepositoryRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Repository >

virtual CreateRepository(google::devtools::artifactregistry::v1::CreateRepositoryRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::CreateRepositoryRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::Repository > >

virtual UpdateRepository(google::devtools::artifactregistry::v1::UpdateRepositoryRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::UpdateRepositoryRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Repository >

virtual DeleteRepository(google::devtools::artifactregistry::v1::DeleteRepositoryRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::DeleteRepositoryRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::OperationMetadata > >

virtual ListPackages(google::devtools::artifactregistry::v1::ListPackagesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListPackagesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::Package >

virtual GetPackage(google::devtools::artifactregistry::v1::GetPackageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetPackageRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Package >

virtual DeletePackage(google::devtools::artifactregistry::v1::DeletePackageRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::DeletePackageRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::OperationMetadata > >

virtual ListVersions(google::devtools::artifactregistry::v1::ListVersionsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListVersionsRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::Version >

virtual GetVersion(google::devtools::artifactregistry::v1::GetVersionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetVersionRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Version >

virtual DeleteVersion(google::devtools::artifactregistry::v1::DeleteVersionRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::DeleteVersionRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::OperationMetadata > >

virtual BatchDeleteVersions(google::devtools::artifactregistry::v1::BatchDeleteVersionsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::BatchDeleteVersionsRequest const &
Returns
Type Description
future< StatusOr< google::devtools::artifactregistry::v1::BatchDeleteVersionsMetadata > >

virtual ListFiles(google::devtools::artifactregistry::v1::ListFilesRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListFilesRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::File >

virtual GetFile(google::devtools::artifactregistry::v1::GetFileRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetFileRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::File >

virtual ListTags(google::devtools::artifactregistry::v1::ListTagsRequest)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::ListTagsRequest
Returns
Type Description
StreamRange< google::devtools::artifactregistry::v1::Tag >

virtual GetTag(google::devtools::artifactregistry::v1::GetTagRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetTagRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Tag >

virtual CreateTag(google::devtools::artifactregistry::v1::CreateTagRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::CreateTagRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Tag >

virtual UpdateTag(google::devtools::artifactregistry::v1::UpdateTagRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::UpdateTagRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::Tag >

virtual DeleteTag(google::devtools::artifactregistry::v1::DeleteTagRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::DeleteTagRequest const &
Returns
Type Description
Status

virtual SetIamPolicy(google::iam::v1::SetIamPolicyRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::iam::v1::SetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual GetIamPolicy(google::iam::v1::GetIamPolicyRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::iam::v1::GetIamPolicyRequest const &
Returns
Type Description
StatusOr< google::iam::v1::Policy >

virtual TestIamPermissions(google::iam::v1::TestIamPermissionsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::iam::v1::TestIamPermissionsRequest const &
Returns
Type Description
StatusOr< google::iam::v1::TestIamPermissionsResponse >

virtual GetProjectSettings(google::devtools::artifactregistry::v1::GetProjectSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetProjectSettingsRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::ProjectSettings >

virtual UpdateProjectSettings(google::devtools::artifactregistry::v1::UpdateProjectSettingsRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::UpdateProjectSettingsRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::ProjectSettings >

virtual GetVPCSCConfig(google::devtools::artifactregistry::v1::GetVPCSCConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::GetVPCSCConfigRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::VPCSCConfig >

virtual UpdateVPCSCConfig(google::devtools::artifactregistry::v1::UpdateVPCSCConfigRequest const &)

This function is implemented using gMock's MOCK_METHOD(). Consult the gMock documentation to use this mock in your tests.

Parameter
Name Description
request google::devtools::artifactregistry::v1::UpdateVPCSCConfigRequest const &
Returns
Type Description
StatusOr< google::devtools::artifactregistry::v1::VPCSCConfig >