-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Clean up python-related system tests #30415
Clean up python-related system tests #30415
Conversation
This reverts commit 3550969.
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
This pull request does not have a backport label. Could you fix it @fearful-symmetry? 🙏
NOTE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me, although there are a lot of changes so maybe I missed something.
I wouldn't carry this through the rest of the system tests unless there is some benefit to you to do so. I don't know that we have a plan for the system tests yet, beyond knowing that nobody likes them. The easiest option is to only refactor the tests you touch regularly.
You could check in the lint+format configuration you used for this to run on the files you touched as a way of preventing them from regressing if you wanted to.
…nd-k8s-env * upstream/main: fix typos and improve sentences (elastic#30432) Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (elastic#30440) {,x-pack/}auditbeat: replace uses of github.com/pkg/errors with stdlib equivalents (elastic#30321) Spelling fix (elastic#30439) packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases (elastic#30438) Add BC about Homebrew no longer being available in 8.0 (elastic#30419) Install gawk as a replacement for mawk in Docker containers. (elastic#30452) Clean up python-related system tests (elastic#30415) Fix TestNewModuleRegistry flakiness (elastic#30453) [Filebeat] [auditd]: Support EXECVE events with truncated argument list (elastic#30382) Set `log.offset` to the start of the reported line in filestream (elastic#30445) clarify SelectedPackageTypes meaning and improve its usage (elastic#30142) [elasticsearch module] serialize shards properties (elastic#30408) Add docs about hints and templates autodiscovery priority (elastic#30343)
…ckaging-docker * upstream/main: (26 commits) Update docker/distribution to 2.8.0 (elastic#30462) Add `parsers` examples to `filestream` reference configuration (elastic#30529) extend documentation about setting orchestrator.cluster fields (elastic#30518) Forward-port 8.0.1 changelog to main (elastic#30522) Switch skip to use `CI` (elastic#30512) packetbeat/beater: don't attempt to install npcap when already installed (elastic#30509) Fix Docker module: rename fields on dashboards (elastic#30500) fix typos and improve sentences (elastic#30432) Add drop and explicit tests to avoid duplicate ingest of elasticsearch logs (elastic#30440) {,x-pack/}auditbeat: replace uses of github.com/pkg/errors with stdlib equivalents (elastic#30321) Spelling fix (elastic#30439) packetbeat/beater: make sure Npcap installation runs before interfaces are needed in all cases (elastic#30438) Add BC about Homebrew no longer being available in 8.0 (elastic#30419) Install gawk as a replacement for mawk in Docker containers. (elastic#30452) Clean up python-related system tests (elastic#30415) Fix TestNewModuleRegistry flakiness (elastic#30453) [Filebeat] [auditd]: Support EXECVE events with truncated argument list (elastic#30382) Set `log.offset` to the start of the reported line in filestream (elastic#30445) clarify SelectedPackageTypes meaning and improve its usage (elastic#30142) [elasticsearch module] serialize shards properties (elastic#30408) ...
What does this PR do?
This PR is the result of me fighting with the python unit tests every time I refactor part of the system module. These tests are pretty old, and in most cases haven't been touched in 6 years, so my goal was to refactor them just enough to both A) not make my linter light up the entire file B) make it easier to adapt the tests as we continue to refactor the system.
However, I was a little unsure of just how far I should take this cleanup. The tests are really old and a lot of the code is kind of strange, but if someone is going to come along in a few months and rewrite the entire tests in go/mage (as has been suggested a few times), it's not worth it to do a more aggressive cleanup. However, if this code is going to stick around for a while, it might be worth it to refactor and modernize the rest of the python test code, of which there is a lot. Right now this PR is basically geared towards making things easier for the system module, and I'd like the opinion of others as to if it's worth it to expand the scope of this PR to the rest of the python test infrastructure.
Why is it important?
The python tests have proven to be something of a burden when refactoring the system code, as their fast-and-loose approach to running beats and fetching data doesn't quite work with the refactored code's stricter reporting.
Checklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.