Skip to content

Commit

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

(cherry picked from commit b91c1f6)
  • Loading branch information
sbcd90 authored and github-actions[bot] committed Dec 12, 2022
1 parent a12f04e commit f8e3bf8
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 f8e3bf8

Please sign in to comment.