Skip to content

Commit

Permalink
fix for running windows integration tests (#176) (#178)
Browse files Browse the repository at this point in the history
* fix for running windows integration tests

Co-authored-by: Subhobrata Dey <[email protected]>
  • Loading branch information
opensearch-trigger-bot[bot] and sbcd90 authored Dec 12, 2022
1 parent a12f04e commit 2c21de6
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ jobs:
os: [ ubuntu-latest, windows-latest, macos-latest ]
include:
- os: windows-latest
os_build_args: -x integTest -x jacocoTestReport
os_build_args: -x jacocoTestReport
working_directory: X:\
os_java_options: -Xmx4096M
- os: macos-latest
os_build_args: -x integTest -x jacocoTestReport
os_build_args: -x jacocoTestReport

name: Build and Test security-analytics with JDK ${{ matrix.java }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,7 @@ public void initRuleIndexAndImportRules(IndexDetectorRequest request, ActionList
@Override
public void onResponse(CreateIndexResponse response) {
ruleIndices.onCreateMappingsResponse(response, true);
ruleIndices.importRules(WriteRequest.RefreshPolicy.IMMEDIATE, indexTimeout,
ruleIndices.importRules(RefreshPolicy.IMMEDIATE, indexTimeout,
new ActionListener<>() {
@Override
public void onResponse(BulkResponse response) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,7 @@ private void loadQueries(Path path, WriteRequest.RefreshPolicy refreshPolicy, Ti
}

private String getRuleCategory(Path folderPath) {
String folder = folderPath.toString();
int idx = folder.lastIndexOf(PathUtils.getDefaultFileSystem().getSeparator());
return folder.substring(idx+1);
return folderPath.getFileName().toString();
}

private void ingestQueries(Map<String, List<String>> logIndexToRules, WriteRequest.RefreshPolicy refreshPolicy, TimeValue indexTimeout, ActionListener<BulkResponse> listener) throws SigmaError, IOException {
Expand Down

0 comments on commit 2c21de6

Please sign in to comment.