NixOS VM tests: Difference between revisions

Write that this page is outdated.
6543 (talk | contribs)
pictures just describe things better sometime
 
(One intermediate revision by one other user not shown)
Line 23: Line 23:
Add this to your test config:
Add this to your test config:


  interactive.nodes.machine = {
  interactive.sshBackdoor.enable = true;
    services.openssh = {
      enable = true;
      settings = {
        PermitRootLogin = "yes";
        PermitEmptyPasswords = "yes";
      };
    };
   
    security.pam.services.sshd.allowNullPassword = true;
   
    virtualisation.forwardPorts = [
      { from = "host"; host.port = 2000; guest.port = 22; }
    ];
};


Now you can connect to this VM via  
Now you can connect to this VM via (on linux):
  ssh root@localhost -p 2000
  ssh -o User=root vsock/3
If you are on MacOS or have multiple VMs look at the shell output that do run the interactive tests:
[[File:Screenshot of interactive test just started.png|none|thumb|444x444px|Screenshot of just started nixos test for meilisearch (interactive)]]


== How to debug tests ? ==
== How to debug tests ? ==