Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Backport 2.x] fix for running windows integration tests #177

Merged
merged 1 commit into from
Dec 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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