19 Commits

Author SHA1 Message Date
Johannes Kirschbauer
e55a3b4fc6 clanTest: throw when usage of 'self' is triggered
That means we rely on a certain structure of the user flake
these assumptions cannot be made. Their flake can have any shape and is not controlled by us
2025-10-24 14:10:17 +02:00
DavHau
ea32fdbd93 generate_test_vars: move into clan_cli
Reduces overhead by not having to manage a separate package for this small tool
2025-09-16 16:37:41 +07:00
Johannes Kirschbauer
5750ab8d3a lib: remove usages of flip
Makes the code more consistent to read.
Usage in 9 places is rather inconsistent style.
2025-09-15 13:17:09 +02:00
pinpox
99dc4f6787 Fix update-vars script 2025-09-01 22:31:09 +02:00
Johannes Kirschbauer
afd1ba6306 checks: mock self.inputs.self by default 2025-07-01 13:19:37 +02:00
Jörg Thalheim
a780dbe60c vars-check: replace slow python implementation with pure nix 2025-07-01 12:46:50 +02:00
DavHau
f966f5b745 clan services: use service modules from clan-core by default
Users will use clan-core services first before making their own. Therefore this is a better default. Also it allow us to simplify rendering of our docs
2025-06-30 10:13:46 +00:00
Jörg Thalheim
581dfeffeb fix unlocked flake.lock in tests 2025-06-28 08:50:41 +02:00
Johannes Kirschbauer
5dc8865da1 modules.nixosVmTest: rename to nixosTest to match the target module _class 2025-06-26 17:37:42 +02:00
Johannes Kirschbauer
f6de6632e4 modules: move clan module to flake.modules.clan.default 2025-06-26 17:08:47 +02:00
Johannes Kirschbauer
761e8b0ec5 refactor: clanLib buildClan 2025-06-26 15:20:05 +02:00
pinpox
d88ac429cb Make machine ID a option 2025-06-24 10:42:03 +02:00
Jörg Thalheim
2f5489a8b7 fix(vars-check): include generator scripts in test closure
The vars-check test was failing because it only included the
runtimeInputs of generators but not the actual generator scripts
themselves. This caused the test to fail when trying to execute
generators that reference local files (like generate.py).

Added allGeneratorScripts to the closureInfo to ensure all generator
scripts and their dependencies are available in the test environment.
2025-06-17 21:09:59 +02:00
Jörg Thalheim
691401f674 no longer make test derivation depends on vars-check
this triggers more builds than necessary.
2025-06-17 21:09:59 +02:00
lassulus
6aaedaa6df generate_test_vars: add support for darwin 2025-06-12 14:49:12 +02:00
DavHau
6f451c700d 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
d37c7c4c05 buildClan function: export all machines via nixosModules/darwinModules
We want each machine not only to be exposed via nixosConfigurations but also as a module.
This allows re-importing the machine in tests and override the architecture for example.
2025-06-09 12:51:22 +00:00
pinpox
e70cf14e8e Fix test runner for tests without vars 2025-06-03 22:35:10 +02:00
DavHau
1add6a6314 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