forked from elastic/beats
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x-pack/winlogbeat: port forward semi-processed events for tests
This brings partially processed event data from a modified version of the testing code at 8896fd3 (the commit immediately prior to the removal of the javascript processing pipeline in elastic#29435: commit at 2f3b0c5cbe9cfdd10e11fd52e2a259e564001100). The evtx.golden.json files were generated by removing the js processing call at https://github.com/elastic/beats/blob/8896fd319a257f3e0783119a7dd8d0978ef62197/x-pack/winlogbeat/module/testing_windows.go#L132-L135 to match the code in that file as it appears here and then run go test -update in x-pack/winlogbeat/module/{powershell,security,sysmon}/test on a windows 2019 host. The test package for each of the modules is also resurrected with modifications reflecting the loss of the javascript processor. Tests in x-pack/winlogbeat/module/{security,sysmon}/test fail in this commit.
- Loading branch information
Showing
108 changed files
with
2,831 additions
and
16,416 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
x-pack/winlogbeat/module/powershell/test/powershell_windows_test.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
// or more contributor license agreements. Licensed under the Elastic License; | ||
// you may not use this file except in compliance with the Elastic License. | ||
|
||
package test | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/elastic/beats/v7/x-pack/winlogbeat/module" | ||
|
||
// Register required processors. | ||
_ "github.com/elastic/beats/v7/libbeat/cmd/instance" | ||
_ "github.com/elastic/beats/v7/libbeat/processors/timestamp" | ||
) | ||
|
||
// Ignore these fields because they can be different on different versions | ||
// of windows. | ||
var ignoreFields = []string{ | ||
"message", | ||
} | ||
|
||
func TestPowerShell(t *testing.T) { | ||
module.TestPipeline(t, "testdata/*.evtx", module.WithFieldFilter(ignoreFields)) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.