T: T7 nushell test runner, devenv test script, command lists, docs testing section
This commit is contained in:
1 parent
396c382046
commit
40cf1073f4
6 files changed
+452
-17
No files matched your search
@@ -0,0 +1,23 @@
|
||||
## Testing
|
||||
|
||||
The peers acceptance test is a NixOS VM test. Three machines run the real `slinuxm`: `alpha` and `beta` consolidate each other over plain HTTP, and `alpha` also declares the TLS-only `gamma` with a private CA. It needs KVM and takes minutes.
|
||||
|
||||
```sh
|
||||
devenv shell -- test vm peers # nix build .#tests.x86_64-linux.peers -L
|
||||
```
|
||||
|
||||
Against a tree without the consolidator the test stops at the first peers assertion; that is expected, the test is written ahead of the feature. `dev/test.nu` is the repository's test runner; `test --help` lists its subcommands and the command behind each.
|
||||
|
||||
In Nushell the runner is a module. Load it once, for example in `config.nu`, and `test unit`, `test vm peers`, ... complete natively:
|
||||
|
||||
```nu
|
||||
use /home/you/src/skyg-linux-tracker/dev/test.nu * # absolute path to dev/test.nu
|
||||
```
|
||||
|
||||
zsh and bash get completion from the same command table; inside `devenv shell` this is already sourced for you:
|
||||
|
||||
```sh
|
||||
source <(test completions zsh) # or: source <(test completions bash)
|
||||
```
|
||||
|
||||
`test self-check` fails if the command table, the defined subcommands and the help text drift apart.
|
||||
Reference in new issue
Block a user