Skip to content

Add test for Ctrl+C behavior

23eb10e
Select commit
Loading
Failed to load commit list.
Draft

Add test for Ctrl+C behavior #8

Add test for Ctrl+C behavior
23eb10e
Select commit
Loading
Failed to load commit list.
Garnix CI / action spec failed Aug 4, 2025 in 3m 38s

action spec

action spec failed

Details

Last 100 lines of logs:

      prints a nice message when no vms are configured [✔]
    accepts multiple vm names [✔]
    removes the state directory when the vm process is not running anymore [✔]
  list
    lists all configured vms [✔]
    has a nice message when no vms are configured [✔]
  up
    when no vm names are given
      starts all vms [✔]
      gives a nice message when no vms are defined [✔]
    vm building state
      when the nix build blocks
        locks the state of a vm when building the nixos config [✔]
        handles attempts to stop building vms gracefully [✔]
      locks the state of a vm when booting [✔]
    when nix evaluation fails
      prints out the error message [✔]
      doesn't add a vm to the state [✔]
  down
    stops vms [✔]
    stops multiple specified vms [✔]
    stops all vms when no vm name given [✔]
    prints a nice message when no vm names are given and no vms are running [✔]
    prints a nice message when the specified vms are not running [✔]
  ssh
    relays the exit code ExitSuccess [✔]
    relays the exit code ExitFailure 1 [✔]
    relays the exit code ExitFailure 42 [✔]
Integration
  lists vms [✔]
  lists vms when there's no `nixosConfigurations` field [✔]
  starts vms [✔]
  has nice output when starting vms [✔]
  has nice output when the nix build fails [✔]
stty: 'standard input': Inappropriate ioctl for device
  `vmcli start` doesn't mess up the terminal [✘]
  starts vms with arbitrary hostnames [✔]
  starts a shell by default [✔]
  can start multiple vms [✔]
  can stop vms [✔]
  doesn't complain when starting a vm twice [✔]
  networking
    allows to talk from one vm to the other by static ip [✔]
    allows connecting to VMs by their name [✔]
  not inside a temporary working dir (for hspec-golden)
    stores the qcow2 image and other files in the storage dir [✔]
      Golden and Actual output didn't change
Networking
  `vde_switch`
    starts the switch when starting a vm [✔]
    stops the switch when a vm is stopped [✔]
    cleans up the files after stopping [✔]
    keeps the switch running for multiple vms [✔]
    stops the switch after all vms are stopped [✔]
    restarts the switch after e.g. a reboot [✔]
  ip assignments
    assigns an ip to vms [✔]
    handles non-running vms gracefully [✔]
    assigns different ips to different vms [✔]
    tries not to re-assign vms [✔]
    wraps around and doesn't assign ips that are in use [✔]
  hostnames
    registers hostname mappings amongst all VMs [✔]
    only sets VM names that are valid hostnames [✔]
    prints a warning if an invalid hostname is used [✔]
Utils
  parseHostname
    returns Just Hostname for valid hostnames
      "valid" [✔]
      "WITH-CAPS" [✔]
      "ending-with-digits-123" [✔]
      "with-123-digits" [✔]
      "with-hyphen" [✔]
      "with.dot" [✔]
    returns Nothing for invalid hostnames
      "" [✔]
      "123-starting-with-digits" [✔]
      "-starting-with-hyphen" [✔]
      ".starting-with-dot" [✔]
      "ending-with-dot." [✔]
      "ending-with-hyphen-" [✔]
      "with spaces" [✔]
      "with--double-hyphen" [✔]
      "with'symbols" [✔]
      "with?symbols" [✔]
      "with_underscore" [✔]

Failures:

  spec/IntegrationSpec.hs:102:5: 
  1) Integration `vmcli start` doesn't mess up the terminal
       uncaught exception: ErrorCall
       command failed with exitcode 1: stty

  To rerun use: --match "/Integration/`vmcli start` doesn't mess up the terminal/" --seed 1490886269

Randomized with seed 1490886269

Finished in 210.5472 seconds
69 examples, 1 failure