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
nixos/osquery: add test #39709
nixos/osquery: add test #39709
Conversation
@GrahamcOfBorg test osquery |
No attempt on x86_64-linux (full log) The following builds were skipped because they don't evaluate on x86_64-linux: tests.osquery Partial log (click to expand)
|
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.osquery Partial log (click to expand)
|
Some time ago I fixed the broken package `osquery` (see NixOS#39336). I had to test the package manually by starting the daemon locally, however this doesn't ensure that the module is still functional. In order to cover the package *and* the integration with the NixOS module I thought that adding a testcase might be the best idea. The current testcase does the following things: * Starts an `osqueryd` service in a test machine with customized logger path and PID file * Ensures that the `osqueryd.service` unit is running * Checks if the customized flags (`pidfile`, `logger_path`) are applied to `osquery`. * Performs a simple test query against the `etc_hosts` database to check if the basic funcitonality of `osquery` (storing system information into a database) works fine.
Test LGTM and runs locally. And the |
@GrahamcOfBorg test osquery |
No attempt on aarch64-linux (full log) The following builds were skipped because they don't evaluate on aarch64-linux: tests.osquery Partial log (click to expand)
|
Success on x86_64-linux (full log) Attempted: tests.osquery Partial log (click to expand)
|
Thanks a ton for maintaining this, @Ma27. I’ve felt disheartened from seeing the package break, but my life has been too busy to contribute in a meaningful capacity for a while now (though I hope that’ll change before the year is up). |
Motivation for this change
Some time ago I fixed the broken package
osquery
(see #39336).I had to test the package manually by starting the daemon locally,
however this doesn't ensure that the module is still functional.
In order to cover the package and the integration with the NixOS
module I thought that adding a testcase might be the best idea.
The current testcase does the following things:
Starts an
osqueryd
service in a test machine with customized loggerpath and PID file
Ensures that the
osqueryd.service
unit is runningChecks if the customized flags (
pidfile
,logger_path
) are appliedto
osquery
.Performs a simple test query against the
etc_hosts
database to checkif the basic funcitonality of
osquery
(storing system information intoa database) works fine.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)