Skip to content

Commit

Permalink
Add assertions to tests
Browse files Browse the repository at this point in the history
Signed-off-by: Jürgen Walter <[email protected]>
  • Loading branch information
juergen-walter committed Sep 25, 2024
1 parent a9d3718 commit a1ae0d1
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public void testInstantiateSinkLogsDefaultLogSink() throws IOException {
final PluginSetting pluginSetting = generatePluginSetting(IndexType.LOG_ANALYTICS.getValue(), null, null);
OpenSearchSink sink = createObjectUnderTest(pluginSetting, true);
final String indexAlias = IndexConstants.TYPE_TO_DEFAULT_ALIAS.get(IndexType.LOG_ANALYTICS);
assertThat(indexAlias, equalTo("logs-otel-v1"));
Request request = new Request(HttpMethod.HEAD, indexAlias);
Response response = client.performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), equalTo(SC_OK));
Expand Down Expand Up @@ -278,6 +279,7 @@ public void testInstantiateSinkMetricsDefaultMetricSink() throws IOException {
final PluginSetting pluginSetting = generatePluginSetting(IndexType.METRIC_ANALYTICS.getValue(), null, null);
OpenSearchSink sink = createObjectUnderTest(pluginSetting, true);
final String indexAlias = IndexConstants.TYPE_TO_DEFAULT_ALIAS.get(IndexType.METRIC_ANALYTICS);
assertThat(indexAlias, equalTo("metrics-otel-v1"));
Request request = new Request(HttpMethod.HEAD, indexAlias);
Response response = client.performRequest(request);
assertThat(response.getStatusLine().getStatusCode(), equalTo(SC_OK));
Expand Down

0 comments on commit a1ae0d1

Please sign in to comment.