Commit Graph

28 Commits

Author SHA1 Message Date
Jörg Thalheim
d5aa917ee7 migrate all projects to python 3.13 linting 2025-07-04 18:39:01 +02:00
Jörg Thalheim
e152740017 container-test-driver: implement wait_for_open_port 2025-06-27 18:35:55 +02:00
a-kenji
0a56f60005 lib/test/sops: Fix secret deployment for test machines
Fix secret deployment for test machines in our NixOS vm and container
tests.

We filter now if we really need to deploy a certain set of files as a
deployment script, which alleviates us running into these edgecases:
```
error: The option `nodes.server.system.activationScripts.setupSecrets.text'
was accessed but has no value defined. Try setting the option.
```
2025-06-27 12:19:46 +02:00
DavHau
b13f64c96d clan tests: allow testing CLI interactions
This is an improvement of the clanTest nixos vm test module.

The module now has a new option clan.test.fromFlake that allows to specify a flake.nix as the source for the test clan instead of specifying clan.XXX options.

This in turn allows accessing the `flake.nix` inside the test driver allowing to use the clan cli on it
2025-06-11 19:30:13 +07:00
DavHau
01737d2bf7 clan tests: convert makeTestClan to a module
Let's not put yet another wrapper around runTest, instead expose our logic as a module that can be imported into any nixos-vm-test
2025-06-03 19:38:02 +07:00
DavHau
a0cbc815e8 makeTestClan: simplify - move parameters into module
... in preparation of removing the makeTestClan wrapper and make this a module instead that can be imported into any test.
2025-06-03 19:38:02 +07:00
DavHau
65d9ef02dc generate-test-vars: fake prompt inputs
Use fake prompt inputs when generating vars for testing
2025-05-31 17:14:26 +07:00
DavHau
d27834b565 tests: actually execute vars checks in CI 2025-05-31 16:16:09 +07:00
DavHau
e81771a724 tests: test vars generation for all clan service tests 2025-05-31 12:17:52 +07:00
Jörg Thalheim
1a1898b5f1 container-test: better error message for nsenter 2025-05-30 12:27:51 +02:00
Jörg Thalheim
795ace408a container-test: disable UsePam for ssh
doesn't work without setuid, which we currently do not support.
2025-05-30 11:53:20 +02:00
pinpox
cb41aaafa1 Prettify nspawn output 2025-05-08 16:20:29 +02:00
pinpox
ace0328a14 Fix debug command to attach to container 2025-05-07 14:41:18 +02:00
a-kenji
5149ed9318 container-test-driver: Fix test naming
Fix the container test naming, as this otherwise can be very confusing.
2025-05-06 19:47:53 +00:00
a-kenji
3e65a76dfe container-test-driver/nsenter: Improve printing of command
Improves printing of `nsenter` command, so that it can easier be copied.
2025-05-06 10:11:20 +00:00
hsjobeki
89fbf723ca Merge pull request 'API(cli): add method to Flake class to allow calling nix functions' (#3502) from hsjobeki/clan-core:improvements-2 into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3502
2025-05-05 20:16:28 +00:00
Johannes Kirschbauer
d42d9ad943 tests: add error prefix for json schema in checks 2025-05-05 21:46:16 +02:00
pinpox
fe36aa4161 Log nsenter command on container tests 2025-05-05 13:00:11 +02:00
Jörg Thalheim
401de330f8 clanTest: remove unneeded parantheses 2025-05-04 14:59:22 +02:00
Michael Hoang
5879c48616 container-test-driver: fix SSH not working inside container tests 2025-04-29 15:10:09 +10:00
Michael Hoang
7d46237b67 container-test-driver: add Machine.fail 2025-04-29 14:57:58 +10:00
Johannes Kirschbauer
a589736f9b lib/tests: fix container driver module path 2025-04-23 16:23:09 +02:00
Johannes Kirschbauer
f6e514ec6f Refactor: move checks/lib into lib/ to avoid duplicate lib
Lets avoid the mistake of nixpkgs having multiple
libs
2025-04-23 16:19:16 +02:00
DavHau
e2fb237c33 inventory tests: use containers by default 2025-04-23 19:49:02 +07:00
Johannes Kirschbauer
999c47dbed Checks: add nixosIntegration test example to hello-service 2025-04-22 06:32:32 +00:00
Johannes Kirschbauer
b791656694 clanLib: init flakeModules for better testing 2025-04-21 16:10:05 +02:00
Johannes Kirschbauer
2796038254 chore(test/makeTestClan): document all options, remove magic specialArgs 2025-04-16 10:33:32 +02:00
Johannes Kirschbauer
7bdb2cabf9 fix: rename folder lib/tests -> lib/test to be consistent with the attribute name 2025-04-16 10:04:31 +02:00