Skip to content
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

Adding runtime testing #1061

Closed
erikarvstedt opened this issue Mar 1, 2020 · 1 comment
Closed

Adding runtime testing #1061

erikarvstedt opened this issue Mar 1, 2020 · 1 comment

Comments

@erikarvstedt
Copy link
Contributor

erikarvstedt commented Mar 1, 2020

While hacking on the activation script I noticed the lack of an infrastructure for
testing runtime features like generation activation and services.

Here's how runtime testing could be implemented:

  • Run tests in a VM using the NixOS testing framework, which is very pleasant to use
    with the new Python backend.
  • Add an interactive testing mode to avoid VM restarts while creating and debugging tests.
    • Besides interactively running tests, it should be possible to rebuild and activate
      changed test home configs from within testing Python REPL.
  • To keep runtime overhead low, we can simply run multiple tests sequentially in a
    single VM. Between tests the home directory and user units are reset.
  • nmt integration is simple: just add a test case with an empty script and a home
    config that references the test derivation.
  • Travis GCE nodes support KVM, so the tests can be run by Travis.

Do you like the concept? I'll then flesh it out and add a PR.

@erikarvstedt
Copy link
Contributor Author

This should be done in a container instead of a VM. Let's revisit this issue when unprivileged containers are implemented in nixpkgs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant