diff --git a/README.md b/README.md index abb241c3aa1b..f2d4050c8ddd 100644 --- a/README.md +++ b/README.md @@ -201,7 +201,7 @@ import com.google.gcloud.resourcemanager.ResourceManagerOptions; import java.util.Iterator; ResourceManager resourceManager = ResourceManagerOptions.defaultInstance().service(); -ProjectInfo myProject = resourceManager.get("some-project-id-that-I-own"); +ProjectInfo myProject = resourceManager.get("some-project-id"); // Use an existing project's ID ProjectInfo newProjectInfo = resourceManager.replace(myProject.toBuilder() .addLabel("launch-status", "in-development").build()); System.out.println("Updated the labels of project " + newProjectInfo.projectId() diff --git a/TESTING.md b/TESTING.md index 7f513a023621..74c9504c9198 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,6 +1,10 @@ ## gcloud-java tools for testing -This library provides tools to help write tests for code that uses gcloud-java services. +This library provides tools to help write tests for code that uses the following gcloud-java services: + +- [Datastore] (#testing-code-that-uses-datastore) +- [Storage] (#testing-code-that-uses-storage) +- [Resource Manager] (#testing-code-that-uses-resource-manager) ### Testing code that uses Datastore @@ -85,8 +89,7 @@ You can test against a temporary local Resource Manager by following these steps 2. In your program, create and use a Resource Manager service object whose host is set to `localhost` at the appropriate port. For example: ```java - ResourceManager resourceManager = ResourceManagerOptions.builder() - .host("http://localhost:" + helper.port()).build().service(); + ResourceManager resourceManager = LocalResourceManagerHelper.options().service(); ``` 3. Run your tests. @@ -99,17 +102,5 @@ You can test against a temporary local Resource Manager by following these steps This method will block until the server thread has been terminated. -#### On a remote machine - -You can test against a remote Resource Manager emulator as well. To do this, set the host to the hostname of the remote machine, like the example below. - - ```java - ResourceManager resourceManager = ResourceManagerOptions.builder() - .host("http://:").build(); - ``` - -Note that the remote Resource Manager emulator must be running before your tests are run. - - [cloud-platform-storage-authentication]:https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts diff --git a/gcloud-java-resourcemanager/README.md b/gcloud-java-resourcemanager/README.md index a58386776345..4e6ebecbbe5c 100644 --- a/gcloud-java-resourcemanager/README.md +++ b/gcloud-java-resourcemanager/README.md @@ -17,8 +17,22 @@ Java idiomatic client for [Google Cloud Resource Manager] (https://cloud.google. Quickstart ---------- -This library is currently under development and will be available soon! - +If you are using Maven, add this to your pom.xml file +```xml + + com.google.gcloud + gcloud-java-resourcemanager + 0.1.0 + +``` +If you are using Gradle, add this to your dependencies +```Groovy +compile 'com.google.gcloud:gcloud-java-resourcemanager:jar:0.1.0' +``` +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.gcloud" % "gcloud-java-resourcemanager" % "0.1.0" +```