Skip to content

Commit

Permalink
chore: change google-cloud-vision ITSystemTest to fuzzy Palace of Fin…
Browse files Browse the repository at this point in the history
…e Arts assertions (#9255)

* chore: change google-cloud-vision ITSystemTest to fuzzy Palace of Fine Arts assertions

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
burkedavison and gcf-owl-bot[bot] authored Mar 20, 2023
1 parent 3d9341a commit 3d36c3f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
8 changes: 3 additions & 5 deletions java-vision/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ Java idiomatic client for [Cloud Vision][product-docs].

If you are using Maven, add this to your pom.xml file:

<!-- {x-version-update-start:google-cloud-vision:released} -->

```xml
<dependency>
Expand All @@ -35,7 +34,6 @@ If you are using SBT, add this to your dependencies:
```Scala
libraryDependencies += "com.google.cloud" % "google-cloud-vision" % "3.11.0"
```
<!-- {x-version-update-end} -->

## Authentication

Expand All @@ -52,7 +50,7 @@ The client application making API calls must be granted [authorization scopes][a
You will need a [Google Cloud Platform Console][developer-console] project with the Cloud Vision [API enabled][enable-api].
You will need to [enable billing][enable-billing] to use Google Cloud Vision.
[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by
[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line:
[installing the Google Cloud Command Line Interface][cloud-cli] and running the following commands in command line:
`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.

### Installation and setup
Expand Down Expand Up @@ -173,14 +171,14 @@ Java is a registered trademark of Oracle and/or its affiliates.
[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/google-cloud-java/java11.html
[stability-image]: https://img.shields.io/badge/stability-stable-green
[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-vision.svg
[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-vision&core=gav
[maven-version-link]: https://central.sonatype.com/artifact/com.google.cloud/google-cloud-vision/3.11.0
[authentication]: https://github.com/googleapis/google-cloud-java#authentication
[auth-scopes]: https://developers.google.com/identity/protocols/oauth2/scopes
[predefined-iam-roles]: https://cloud.google.com/iam/docs/understanding-roles#predefined_roles
[iam-policy]: https://cloud.google.com/iam/docs/overview#cloud-iam-policy
[developer-console]: https://console.developers.google.com/
[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects
[cloud-sdk]: https://cloud.google.com/sdk/
[cloud-cli]: https://cloud.google.com/cli
[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/main/troubleshooting/readme.md#troubleshooting
[contributing]: https://github.com/googleapis/google-cloud-java/blob/main/CONTRIBUTING.md
[code-of-conduct]: https://github.com/googleapis/google-cloud-java/blob/main/CODE_OF_CONDUCT.md#contributor-code-of-conduct
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,8 @@ public void detectLandmarksTest() throws IOException {
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
actual.add(annotation.getDescription());
}
assertThat(actual).contains("Palace of Fine Arts");
String allAnnotations = String.join(";", actual);
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
Expand All @@ -355,7 +356,8 @@ public void detectLandmarksUrlTest() throws Exception {
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
actual.add(annotation.getDescription());
}
assertThat(actual).contains("Palace of Fine Arts");
String allAnnotations = String.join(";", actual);
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
Expand All @@ -366,7 +368,8 @@ public void detectLandmarksGcsTest() throws IOException {
for (EntityAnnotation annotation : assertNotEmpty(res, res.getLandmarkAnnotationsList())) {
actual.add(annotation.getDescription());
}
assertThat(actual).contains("Palace of Fine Arts");
String allAnnotations = String.join(";", actual);
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
Expand Down Expand Up @@ -476,7 +479,8 @@ public void detectWebEntitiesGcsTest() {
assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) {
actual.add(entity.getDescription());
}
assertThat(actual).contains("Palace of Fine Arts");
String allAnnotations = String.join(";", actual);
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
Expand Down Expand Up @@ -531,7 +535,8 @@ public void detectWebEntitiesIncludeGeoResultsGcsTest() {
assertNotEmpty(res, res.getWebDetection().getWebEntitiesList())) {
actual.add(entity.getDescription());
}
assertThat(actual).contains("Palace of Fine Arts");
String allAnnotations = String.join(";", actual);
assertThat(allAnnotations).ignoringCase().contains("Palace of Fine Arts");
}

@Test
Expand Down

0 comments on commit 3d36c3f

Please sign in to comment.