Skip to content

Commit

Permalink
docs: add more info around how to test via VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
ahayzen committed Apr 21, 2024
1 parent 46406a5 commit eb04d7f
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions docs/commands/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,27 @@ SPDX-FileCopyrightText: Andrew Hayzen <[email protected]>
SPDX-License-Identifier: MPL-2.0
-->

# Test with flake check

We need the sandbox disabled as we need network access

```console
$ nix flake --option sandbox false check -L --show-trace
```

# Test in a VM

Ensure that you add the following snippet to the configuration of the machine you want to test in a VM.

```nix
{
ahayzen.testing = true;
}
```

> Note that if you are testing http update any `Caddyfile.vm` to use `http://localhost`
> rather than `http://mydomain.com` to access locally.
## `nixos-build`

```console
Expand All @@ -31,11 +50,3 @@ $ result/bin/run-<machine>-vm
```console
$ ssh -oUserKnownHostsFile=/dev/null -oStrictHostKeyChecking=no admin@localhost -p 2221
```

## Flake check

We need the sandbox disabled as we need network access

```console
$ nix flake --option sandbox false check -L --show-trace
```

0 comments on commit eb04d7f

Please sign in to comment.