diff --git a/docs/commands/testing.md b/docs/commands/testing.md index ab99b0e2..104f2439 100644 --- a/docs/commands/testing.md +++ b/docs/commands/testing.md @@ -4,8 +4,27 @@ SPDX-FileCopyrightText: Andrew Hayzen 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 @@ -31,11 +50,3 @@ $ result/bin/run--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 -```