-
Notifications
You must be signed in to change notification settings - Fork 104
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
Modularize Tests #243
Modularize Tests #243
Conversation
@jonasnick, @nixbitcoin do you use a systemd-based distro other than NixOS for developing? I'll try adding |
fd0b74b
to
4342dab
Compare
b0fad64
to
31aa106
Compare
Looks interesting! I'm running ArchLinux which is systemd based. So far qemu was sufficient for me but I wouldn't say no to testing with fast containers. |
c843280
to
ddead36
Compare
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 is excellent! Concept ACK
I don't see why the tests suddenly don't need to be executed in the corresponding namespace anymore, or was that always the case?
@nixbitcoin since you wrote a large part of the existing tests, would you have time to look at this as well?
README.md
Outdated
./run-tests.sh debug | ||
print(succeed("systemctl status bitcoind")) | ||
|
||
# Run a node in a container |
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.
Perhaps mention that this is NixOS only?
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.
I'll have a shot today at making extra-container work on all systemd-based distros.
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 would also be interesting for me, since I'm running Debian and couldn't test the container yet. Planning to switch to NixOS this year.
Yes. |
The plural is consistent with tests.py and run-tests.sh
One line per arg.
8ef0ea8
to
474095a
Compare
@nixbitcoin it could be the case that the kernel in Debian 10.6 (latest release) is too old to support seccomp system call filters in container services, leading to failures when starting nix-bitcoin services.
|
474095a
to
d586b47
Compare
I'm getting |
@nixbitcoin, thanks, I'll fix this in extra-container. |
d586b47
to
32482d4
Compare
|
32482d4
to
cd67c3b
Compare
Awesome, thanks for testing. I've added a multi-user installation check to extra-container. Use this to audit the extra-container update:
Meanwhile, I always keep updating the unsquashed branch. |
$1 was not substituted due to single quotes.
Needed for container support.
Needed for the upcoming 'container' command
This service is not enabled and its netns doesn't exist.
This fixes modules-only usage. We can leave enabling tor and tor.client to secure-node.nix, on which spark-wallet has a strict dependency.
This tests that the modules work without the secure-node template. The test currently fails at runtime, but evaluating already helps catching module-related errors.
cd67c3b
to
1cc432a
Compare
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.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
ACK 1cc432a1363eaafcb200b4ad3a4e7cad989fde26
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCgAdFiEEV3o0Un8+KoXoD+Fk3RH5rVMIs7oFAl+JqWAACgkQ3RH5rVMI
s7psRw//SijO6jLSG0PvlTocU46FVGc2daJL1ZUf2aBcGAVfxe428t9fKjFqkccB
k3WK3qgF8T+Jlw2Jg61geihSu7ghJ2UJC2AG59Sq3jHopX+golwnEJTJV8ESWajO
o5ZVeA/zYtwPnN8yCjGpCSgHvhm2tlCWf0YUcMzAuwSp3qKLnlXlaF7HsMCTIxRU
vePnbzPJFSakc2SVW7tRaaycvMGpdKy4WEohv0kH0L5nvrbK3W5vmFi812UaFrxC
gMADX0wpoJm1CdZYvTWEIN3EC11x+SXkwn9wD8CxEX+MgDtUYXtc//JghQxDLUif
Dcr8J5JyFxK9Iyqv6I/wjQUpFmk4ELRH4JPUMaDhV6Pwu4Q+0tVqinwj8kWv2E2y
CdkehkETawWMtVL/lNtIpytcp3X+CDXx8kaYOO5Ul6uFUicgPsiOMSaeup4zcmWd
6aeZr6TyQzT3OhnIkbuxoNfFxzqdmaFNe5BUSNw/9DdSxUQLay4h0fceqiBdUdyc
2NOjYtg+7vHFpnx/0essWPWO8vqIMdb/5G0Tdzu5bVj4FpW8LPncMS6pAxoCjZO6
wHCoN0W9UH966fgIAMw7+WDu1q60IFy36/CAcyh9OQ9xzZwXE/YEthpwyZhLF6Eq
kVSK5K1M/tmaR2yVnSONPen2pAV6/72vLWqFnVOTB7xx5KXE/wM=
=ekbv
-----END PGP SIGNATURE-----
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.
ACK 1cc432a
This improves debugging and experimenting by making it easy to compose fine-grained
scenarios that have specific tests and features enabled.
Scenarios can now be defined like this:
Custom scenarios can conveniently be added by setting the env variable
scenarioOverridesFile
.For undefined scenarios the tests are run with an adhoc scenario where
services.<scenario>
is enabled:Also, the test output now includes the subtest name and duration and subtests use nested logging, which improves the html log.
Containers
Scenarios can now be run in containers (for now, without the python test suite) for super fast
debugging and experimenting.
Like in the examples, creating NixOS containers needs root permissions.
Review helper
Use the following to audit 4548576
(extra-container: pre-release -> 0.4)