tests: Add functional tests using NixOS in Podman (Docker)#1326
Closed
adisbladis wants to merge 15 commits intoNixOS:masterfrom
Closed
tests: Add functional tests using NixOS in Podman (Docker)#1326adisbladis wants to merge 15 commits intoNixOS:masterfrom
adisbladis wants to merge 15 commits intoNixOS:masterfrom
Conversation
3bbfdd6 to
0843a26
Compare
grahamc
suggested changes
Apr 29, 2020
Member
grahamc
left a comment
There was a problem hiding this comment.
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 | |||
Member
There was a problem hiding this comment.
We should find the tests that apply to nixops core and keep them, and delete the rest.
Member
Author
There was a problem hiding this comment.
Let's do that in a follow-up?
| @@ -59,3 +59,12 @@ jobs: | |||
| uses: cachix/install-nix-action@v8 | |||
Member
There was a problem hiding this comment.
- 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
grahamc
reviewed
May 5, 2020
Member
grahamc
left a comment
There was a problem hiding this comment.
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+14signal, (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 <[email protected]>
16 tasks
Member
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.