elastic / beats

:tropical_fish: Beats - Lightweight shippers for Elasticsearch & Logstash
https://www.elastic.co/products/beats
Other
12.11k stars 4.91k forks source link

[Auditbeat] Failing x-pack/auditbeat tests on Windows #9748

Closed cwurm closed 5 years ago

cwurm commented 5 years ago

Flaky Test

Stack Trace

process unit test, e.g. here

10:29:11 >> go test: Unit Testing
10:29:18 FAILURES:
10:29:18 Error: go test failed: 1 test failures
10:29:18 Package: github.com/elastic/beats/x-pack/auditbeat/module/system/process
10:29:18 Test:    TestData
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:295
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:184
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:161
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/metricbeat/mb/testing/modules.go:203
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process_test.go:16
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/testing/testing.go:827
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/runtime/asm_amd64.s:1333
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:186
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process.go:161
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/metricbeat/mb/testing/modules.go:203
10:29:18 C:/Users/jenkins/workspace/elastic+beats+master+multijob-windows/beat/x-pack/auditbeat/label/windows/src/github.com/elastic/beats/x-pack/auditbeat/module/system/process/process_test.go:16
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/testing/testing.go:827
10:29:18 C:/Users/jenkins.BEATS-CI-WINDOW/.gvm/versions/go1.11.4.windows.amd64/src/runtime/asm_amd64.s:1333
10:29:18 ----

System tests, e.g. here:

11:31:48 >> go test: Unit Test Passed
11:31:48 System testing x-pack/auditbeat
11:31:59 E
11:31:59 ======================================================================
11:31:59 ERROR: Failure: ImportError (No module named metricbeat)
11:31:59 ----------------------------------------------------------------------
11:31:59 Traceback (most recent call last):
11:31:59   File "c:\python27\lib\site-packages\nose\loader.py", line 418, in loadTestsFromName
11:31:59     addr.filename, addr.module)
11:31:59   File "c:\python27\lib\site-packages\nose\importer.py", line 47, in importFromPath
11:31:59     return self.importFromDir(dir_path, fqname)
11:31:59   File "c:\python27\lib\site-packages\nose\importer.py", line 94, in importFromDir
11:31:59     mod = load_module(part_fqname, fh, filename, desc)
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\test_metricsets.py", line 9, in <module>
11:31:59     from auditbeat_xpack import *
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\auditbeat_xpack.py", line 5, in <module>
11:31:59     from auditbeat import BaseTest as AuditbeatTest
11:31:59   File "C:\Users\jenkins\workspace\elastic+beats+pull-request+multijob-windows\beat\x-pack\auditbeat\label\windows\src\github.com\elastic\beats\x-pack\auditbeat\tests\system\../../../../auditbeat/tests/system\auditbeat.py", line 11, in <module>
11:31:59     from metricbeat import BaseTest as MetricbeatTest
11:31:59 ImportError: No module named metricbeat
elasticmachine commented 5 years ago

Pinging @elastic/secops

cwurm commented 5 years ago

The ImportError in the system test is fixed with https://github.com/elastic/beats/pull/9750.

Both unit and system test for the process metricset are skipped on Windows for now because of problems in the data collection.