Skip to content

Commit

Permalink
fix for failure in syslogs mappings view api (opensearch-project#435) (
Browse files Browse the repository at this point in the history
…opensearch-project#436)

Signed-off-by: Subhobrata Dey <sbcd90@gmail.com>
  • Loading branch information
opensearch-trigger-bot[bot] committed May 12, 2023
1 parent 2285689 commit e510f56
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/resources/OSMapping/mapper_topics.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,6 @@
"github": "OSMapping/github/mappings.json",
"azure": "OSMapping/azure/mappings.json",
"windows": "OSMapping/windows/mappings.json",
"test_windows": "OSMapping/test_windows/mappings.json"
"test_windows": "OSMapping/test_windows/mappings.json",
"linux": "OSMapping/linux/mappings.json"
}
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,21 @@ public void testGetMappingsViewSuccess() throws IOException {
assertEquals(3, unmappedFieldAliases.size());
}

public void testGetMappingsViewLinuxSuccess() throws IOException {

String testIndexName = "get_mappings_view_index";

createSampleIndex(testIndexName);

// Execute GetMappingsViewAction to add alias mapping for index
Request request = new Request("GET", SecurityAnalyticsPlugin.MAPPINGS_VIEW_BASE_URI);
// both req params and req body are supported
request.addParameter("index_name", testIndexName);
request.addParameter("rule_topic", "linux");
Response response = client().performRequest(request);
assertEquals(HttpStatus.SC_OK, response.getStatusLine().getStatusCode());
}

public void testCreateMappings_withDatastream_success() throws IOException {
String datastream = "test_datastream";

Expand Down

0 comments on commit e510f56

Please sign in to comment.