-
-
Notifications
You must be signed in to change notification settings - Fork 361
tests: Add functional tests using NixOS in Podman (Docker) #1326
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
Conversation
3bbfdd6
to
0843a26
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.
I was collecting more feedback than this, but I think the comment about docker is sufficient to Request Changes now 😂 .
@@ -0,0 +1,14 @@ | |||
import os |
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.
We should find the tests that apply to nixops core and keep them, and delete the rest.
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.
Let's do that in a follow-up?
@@ -59,3 +59,12 @@ jobs: | |||
uses: cachix/install-nix-action@v8 |
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.
- Needs documentation in the readme on how to write / run tests
- I couldn't run the tests without installing podman / docker, so that should be written down too
- it'd be cool to switch to pytest, which supports auto-discovering test case files automatically:
@pytest.mark.parametrize("path", pathlib.Path().glob("**/*.nix"))
def test_nix_file(path): ...
We want to extend "real world" testing by a lot in NixOps and containers is a way we can do so within the confines of free Github Actions runners.
36be987
to
bc3ae75
Compare
5d4d0e5
to
b5e940f
Compare
To work around containers/podman#6053
f59788a
to
a0f487e
Compare
Running a full systemd including gettys inside a privileged container has nasty side effects such as the container getty starting to write to the same tty as the system getty. Always run Podman since it can run rootless and doesn't suffer from these drawbacks.
a0f487e
to
8dc329b
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.
I wonder if we should:
- use Popen and a context manager
- with some asyncio things to capture stdout and stderr and forward to the test log
- on exit of the manager, send the podman process the
RTMIN+14
signal, (from man systemd):
SIGRTMIN+14
Immediately powers off the machine.
Right now after my testing I have lots of extra podman log
processes and podman containers running.
Co-authored-by: Graham Christensen <graham@grahamc.com>
This is too complex.. I think we'll just bite the bullet and accept that Github Actions is going to be slow and use the NixOS VM test infra regardless. |
We want to extend "real world" testing by a lot in NixOps and containers is a way we can do so within the confines of free Github Actions runners.