- 1.57.0 (latest)
- 1.56.0
- 1.55.0
- 1.54.0
- 1.53.0
- 1.51.0
- 1.50.0
- 1.49.0
- 1.48.0
- 1.47.0
- 1.46.0
- 1.45.0
- 1.44.0
- 1.43.0
- 1.42.0
- 1.41.0
- 1.39.0
- 1.38.0
- 1.37.0
- 1.36.0
- 1.35.0
- 1.34.0
- 1.33.0
- 1.32.0
- 1.31.0
- 1.30.0
- 1.29.0
- 1.26.0
- 1.25.0
- 1.24.0
- 1.23.0
- 1.22.0
- 1.21.0
- 1.20.0
- 1.19.0
- 1.18.0
- 1.17.0
- 1.16.0
- 1.15.0
- 1.14.0
- 1.13.0
- 1.11.0
- 1.10.0
- 1.9.0
- 1.8.0
- 1.7.0
- 1.6.0
- 1.5.6
- 1.4.0
- 1.3.2
- 1.2.12
A testing helper for Google Cloud Resource Manager.
A simple usage example: Before the test:
LocalResourceManagerHelper resourceManagerHelper = LocalResourceManagerHelper.create();
resourceManagerHelper.start();
ResourceManager resourceManager = resourceManagerHelper.getOptions().getService();
After the test:
resourceManagerHelper.stop();
Classes
LocalResourceManagerHelper (deprecated)
Deprecated. v3 GAPIC client of ResourceManager is now available
Utility to create a local Resource Manager mock for testing.
The mock runs in a separate thread, listening for HTTP requests on the local machine at an ephemeral port. While this mock attempts to simulate the Cloud Resource Manager, there are some divergences in behavior. The following is a non-exhaustive list of some of those behavioral differences:
- This mock assumes you have adequate permissions for any action. Related to this, testIamPermissions always indicates that the caller has all permissions listed in the request.
- IAM policies are set to an empty policy with version 0 (only legacy roles supported) upon project creation. The actual service will not have an empty list of bindings and may also set your version to 1.
- There is no input validation for the policy provided when replacing a policy or calling testIamPermissions.
- In this mock, projects never move from the DELETE_REQUESTED lifecycle state to DELETE_IN_PROGRESS without an explicit call to the utility method #changeLifecycleState. Similarly, a project is never completely removed without an explicit call to the utility method #removeProject.
- The messages in the error responses given by this mock do not necessarily match the messages given by the actual service.