Commit Graph

205 Commits

Author SHA1 Message Date
DavHau
9f716741ef api/machines: add test ensuring empty config is valid 2023-11-13 21:56:02 +07:00
DavHau
d755048dc2 api/machines: allow config verification on imaginary machines
Machines do not need to exist in order to verify their configuration.

This allows verifying a config before creating an actual machine with it.
2023-11-13 21:24:05 +07:00
DavHau
33944cf74e api/machines: verify config by evaluating the .vm output
This fixes the problem where fileSystems were missing, or boot.loader was not set.

SInce we want VMs anyways for now, this strategy aligns well
2023-11-13 20:50:11 +07:00
DavHau
2fafc9a38b api/machines: init put_machine replacing create_machine and set_machine_config
This allows creating and configuring a machine in one single step.
2023-11-13 20:25:52 +07:00
DavHau
1e2e37880c api/machines: ensure name is valid hostname 2023-11-12 07:57:48 +07:00
Jörg Thalheim
706e7970f4 vms/create: drop extra flake argument and make it work with local flakes 2023-11-10 13:43:14 +01:00
Jörg Thalheim
2924e3e912 drop unused clan_data_dir 2023-11-10 12:55:46 +01:00
Jörg Thalheim
48d7968cf9 move flake configuration to .config/clan/flakes rather than $XDG_DATA_DIRS 2023-11-10 12:50:51 +01:00
clan-bot
aa15bebb0c Merge pull request 'zerotier: allow to persist zerotier identities/ips/meshnames for non-controller' (#482) from zerotier into main 2023-11-10 10:59:48 +00:00
Jörg Thalheim
e436fef13d allow to persist zerotier identities/ips/meshnames for non-controller 2023-11-10 11:56:54 +01:00
DavHau
170d29a15a api/schema: return list of missing modules 2023-11-10 15:07:15 +07:00
DavHau
da32031eda api/schema: don't crash on eval error 2023-11-10 14:27:03 +07:00
Jörg Thalheim
679b70bb34 also override XDG_DATA_HOME in tests
otherwise tests will fail if XDG_DATA_HOME is set by a user
2023-11-09 17:45:24 +01:00
Jörg Thalheim
5d972ed4a4 clan: use .local/share as default for XDG_DATA_HOME 2023-11-09 17:45:24 +01:00
DavHau
fc1591a0a8 api/schema: get schema without having a machine
Also done:
- add @pytest.mark.with_core indicating that a test depends on clan-core and cannot be cached
- separate unit tests into two derivations, ones that can be cached and ones that cannot.
- fix frontend typescript code
2023-11-09 15:30:25 +07:00
Qubasa
4ff9990054 Fixed wrong examples 2023-11-08 21:40:17 +01:00
Qubasa
93c6270386 Added deal contract framework and testing documentation 2023-11-08 19:56:07 +01:00
DavHau
6e281dd7c3 api/machines: better input/output validation
Also move contents tof 'config' to the top-level
2023-11-06 17:56:27 +07:00
lassulus
efafe6f0e3 clan-cli secrets: flake_name -> flake_dir 2023-11-05 16:58:48 +01:00
Qubasa
b48cd4e9ae nix fmt 2023-11-03 22:22:16 +01:00
Qubasa
bdd656cb94 Fixing failing test 2023-11-03 22:21:22 +01:00
Qubasa
a00056824d API: Added /api/flake/list. Added API grouping and description for better visibility 2023-11-03 22:05:33 +01:00
Qubasa
04b1fc2524 Fixed test_webui only failing in nix_sandbox also fixed test_create_flake 2023-10-29 19:51:35 +01:00
Qubasa
1fef2d1732 Fixed test_webui only failing in nix_sandbox 2023-10-29 19:35:29 +01:00
Johannes Kirschbauer
63a0adb678 format pytest 2023-10-28 18:38:14 +02:00
Qubasa
ff866ca4b2 Fixing test_clan_modules test 2023-10-27 23:39:02 +02:00
Qubasa
e389c7cfe7 Updated to main branch. Removed cluttering asyncio and httpx log messages 2023-10-27 23:36:45 +02:00
Qubasa
1a2e117523 Fixing deadlock 2023-10-27 19:26:03 +02:00
Qubasa
a628934351 Removing find_git_repo 2023-10-27 19:26:03 +02:00
Qubasa
8e8b6530b0 Fixing test_vms_api test 2023-10-27 19:26:03 +02:00
Qubasa
750b4b6b7e Fixing test_vms_api test 2023-10-27 19:26:03 +02:00
Qubasa
5bd2345bc1 Commit only for debugging Container 2023-10-27 19:26:03 +02:00
Qubasa
768b567f21 nix fmt 2023-10-27 19:26:03 +02:00
Qubasa
916fa8e570 All tests passing babyyy !! 2023-10-27 19:26:03 +02:00
Qubasa
0be3dac289 nix fmt 2023-10-27 19:21:50 +02:00
Qubasa
8ff80b025c Fixing a multitude of tests 2023-10-27 19:21:50 +02:00
Qubasa
adffdc14f6 Added repro_env_break debugging command. This spawn a terminal inside the temp home folder with the same environment as the python test 2023-10-27 19:20:17 +02:00
Qubasa
950808498f Working test_create_flake 2023-10-27 19:20:17 +02:00
Qubasa
3dc7d12e9c Added ref to Qubasa-main in template/new-clan/flake.nix 2023-10-27 19:20:17 +02:00
Qubasa
8e9034ad02 Added clanName argument to clan-core.lib.builClan 2023-10-27 19:20:17 +02:00
Qubasa
9c8829c32f nix fmt 2023-10-27 19:19:45 +02:00
Qubasa
6d0deefa6b Added ipdb as breakpoint console. Improved logging. 2023-10-27 19:19:45 +02:00
Qubasa
0ab2b853f2 Improved logging messages. Added ClanError if flake create or machine create already exist 2023-10-27 19:18:45 +02:00
Qubasa
d96ea61243 Secrets tests passing. nix fmt doesn't complain 2023-10-27 19:18:45 +02:00
Qubasa
1631dc631b Improved test logging with frame inspection 2023-10-27 19:18:45 +02:00
Qubasa
7bbadaa60f Fixed cyclic dependencie AND swapped pytest-parallel for pytest-xdist to fix deadlock in tests 2023-10-27 19:18:45 +02:00
Qubasa
ecdd4949b7 Added new type FlakeName 2023-10-27 19:18:45 +02:00
Qubasa
f976121fa6 Added flake_name:str argument everywhere, nix fmt doesn't complain anymore 2023-10-27 19:15:40 +02:00
Qubasa
2ad87785c0 Added state directory. 2023-10-27 19:11:27 +02:00
Qubasa
58b54bb9df API: Added Path validators. api/flake/create inits git repo. Fixed vscode interpreter problem 2023-10-27 19:11:27 +02:00