Skip to content

Commit 797ebed

Browse files
committed
dev content review
1 parent e7a7f77 commit 797ebed

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

Diff for: README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ Because the `inventory` service provides the [hotspot file=2]`/health/ready` hea
274274

275275
The [hotspot=getLogger file=0]`LoggerFactory.getLogger()` and [hotspot=withLogConsumer1 hotspot=withLogConsumer2 file=0]`withLogConsumer(new Slf4jLogConsumer(Logger))` methods integrate container logs with the test logs by piping the container output to the specified logger.
276276

277-
The [hotspot=createRestClient file=0]`createRestClient()` method creates a REST client instance with the `SystemResourceClient` interface, and configures a hostname verifier if the tests run over HTTPS.
277+
The [hotspot=createRestClient file=0]`createRestClient()` method creates a REST client instance with the `SystemResourceClient` interface, and configures a hostname verifier for testing over the HTTPS protocol.
278278

279279
The [hotspot=setup file=0]`setup()` method prepares the test environment. It checks whether the tests are running in dev mode or local runtime, or via Testcontainers, by using the [hotspot=isServiceRunning file=0]`isServiceRunning()` helper. If it's in dev mode or local runtime, it ensures that the Postgres database is running locally. In the case of no running runtime, the test starts the [hotspot=postgresContainerStart file=0]`postgresContainer` and [hotspot=inventoryContainerStart file=0]`inventoryContainer` test containers.
280280

Diff for: finish/src/test/java/it/io/openliberty/guides/inventory/SystemResourceIT.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@ private static SystemResourceClient createRestClient(String urlPath)
110110
throws KeyStoreException {
111111
ClientBuilder builder = ResteasyClientBuilder.newBuilder();
112112
builder.trustStore(KeyStore.getInstance("PKCS12"));
113-
HostnameVerifier v = new HostnameVerifier() {
114-
@Override
115-
public boolean verify(String hostname, SSLSession session) {
116-
return hostname.equals("localhost") || hostname.equals("docker");
117-
} };
118-
builder.hostnameVerifier(v);
113+
builder.hostnameVerifier(
114+
new HostnameVerifier() {
115+
@Override
116+
public boolean verify(String hostname, SSLSession session) {
117+
return hostname.equals("localhost") || hostname.equals("docker");
118+
}});
119119
ResteasyClient client = (ResteasyClient) builder.build();
120120
ResteasyWebTarget target = client.target(UriBuilder.fromPath(urlPath));
121121
return target.proxy(SystemResourceClient.class);

0 commit comments

Comments
 (0)