Files
devydave a28cc7afce
continuous-integration/drone/push Build is passing
docs: more formatting and typo
2026-08-13 20:41:04 +02:00
..
2026-08-13 20:41:04 +02:00

Hosts

These hosts are VMs used for running the integration tests on your local machine. The hosts contain a client where abra with the tests will be run and a server to simulate a remote machine.

Prepare the host

For this setup to work you need a machine with NixOS and flakes enabled.

  1. Import the abra flake

The install example is based on the using nix flakes wiki page.

inputs = {
  abra = {
    url = "git+https://git.coopcloud.tech/toolshed/abra.git";
  };
};
  1. Add the host module to your configuration

Now add the host module to your configuration. At the toplevel of a flake it could look like this:

desktop = inputs.nixpkgs.lib.nixosSystem {
  system = "x86_64-linux";
  modules = [
    abra.nixosModules.host
    ./configuration.nix
  ];
  specialArgs = inputs;
};
  1. Adjust the required config
abra.testing = {
  enable = true; # loads the required config, when set true
  externalInterface = "eth1"; # adjust this to your network interface that has access to the internet
};

You can look up the interface with ip link. After that rebuild your system and you are ready to go.

Get started

All commands are run on the repository root path.

  1. Set path to repo

The VM will create a shared volume from the content of the file tests/resources/path_to_repo. Set the content of the file to the path of your abra repository. This will share the repository from your machine with the VM and you can edit files while testing without rebuiling or restarting the VM.

  1. Create the VMs
make vm-client-create
make vm-server-create
  1. Start the VMs
make vm-client-start
make vm-server-start

After running that command you should be able to ping the machines. The client runs on 10.0.0.2 and server 10.0.0.3

  1. Connect to the client

Running the following command will connect to the client VM via SSH.

make vm-client-connect
  1. Run the tests
make test-integration