Commit Graph

47 Commits

Author SHA1 Message Date
DavHau
11c37ebeba vars/keygen: fix + cleanup tests
- generate keys in ./sops instead of ./sops/vars for now
- don't initialize all flakes with sops keys, only generate when needed
- use the new 'clan vars keygen' in tests
2024-10-04 17:25:17 +02:00
Jörg Thalheim
ca8f36201b test superflous test_vm_qmp
we already have other tests covering this and VMs + NixOS are slow
2024-10-01 20:57:07 +02:00
Jörg Thalheim
8b205c78bf fix resource leaks in qmp tests 2024-10-01 20:54:19 +02:00
Qubasa
2568002611 clan-cli: Make run_vm_in_thread fail fast. Fix generate_flake to support machine_id 2024-09-06 18:53:02 +02:00
Jörg Thalheim
1fa0e72bea use pathlib everywhere 2024-09-02 18:26:13 +02:00
Jörg Thalheim
22d6e5e153 enable comprehensions linting rules 2024-09-02 13:35:52 +02:00
Jörg Thalheim
969eb2f16e fix users in VM again 2024-08-24 19:19:24 +02:00
Qubasa
19fe0432d9 clan-cli: Fix some type errors in tests 2024-08-21 15:48:43 +02:00
Jörg Thalheim
e51905545d add fixture to capture output in tests less fragile
Now we always remove previous output before capturing.
2024-08-15 18:45:03 +02:00
DavHau
629861d404 tests: improve testing framework for impure vm tests
Also fix computet sops secret paths for vars
2024-08-04 13:40:12 +07:00
DavHau
e22ec9ea5a clan-cli/tests: improve test helpers for VMs 2024-08-03 15:26:53 +07:00
Jörg Thalheim
64956a7a0a Revert "clan-cli: deprecate nix_shell() in favor of run_cmd()"
This reverts commit a598b878a5.
2024-07-17 14:04:49 +02:00
DavHau
a598b878a5 clan-cli: deprecate nix_shell() in favor of run_cmd() 2024-07-16 14:03:17 +07:00
DavHau
e7d5a6f854 impure-checks: improve performance by disabling dynamic deps 2024-07-16 12:42:45 +07:00
DavHau
4898706480 clan-cli: simplify cli helper 2024-07-10 18:14:06 +07:00
DavHau
336e99b2a7 clan-cli tests: remove dynamic inclusion of helpers module
Dynamically extending the python path at runtime is bad for developer experience, as this is not understood by the text editor and therefore jump to definition etc. does not work.

-> Better to remove the dynamic inclusion and force developers to specify the import correctly.
2024-07-05 16:38:22 +07:00
DavHau
4db2e8303f refactor: rename clanCore -> clan.core 2024-06-18 18:32:40 +07:00
Jörg Thalheim
d002419ae7 drop global argparse flags
They get shadowed by subargparser options.
2024-05-29 10:21:35 +02:00
Qubasa
d6d8a88549 clan-vm-manager: Working pytest skeleton. clan-cli: Fixing devshell depending on itself 2024-03-24 23:36:00 +01:00
clan-bot
e023d25b4b Merge pull request 'add option to set defaultGroups for secrets' (#858) from Mic92-target_host into main 2024-02-16 16:29:28 +00:00
Jörg Thalheim
023b9f4257 add option to set defaultGroups for secrets 2024-02-16 17:26:20 +01:00
Qubasa
8a0edddca7 clan-vm-manager: Fixing vm starting. 2024-02-16 16:10:49 +07:00
Qubasa
0b0867907e clan-vm-manager: Added clan icon to trayicon 2024-02-16 12:25:06 +07:00
clan-bot
f91df4fb88 Merge pull request 'clan_vm_manager: --debug enables debug mode in clan_cli too' (#840) from Qubasa-add_spinner into main 2024-02-14 08:43:14 +00:00
Qubasa
3e8350bd3f clan_cli: Added longer timeout for test 2024-02-14 15:40:03 +07:00
Jörg Thalheim
9f494e1024 drop check for /var/lib/nixos 2024-02-13 12:44:22 +01:00
Qubasa
6d06742c49 clan_cli: Added lazy qmp 2024-02-13 16:44:09 +07:00
Qubasa
e17fa83dad test_vms_cli: Trying new way of testing 2024-02-13 16:44:09 +07:00
Qubasa
a1afd05fcb clan_cli: Made qmp implementation lazy 2024-02-13 16:44:09 +07:00
DavHau
a438a27c69 vms: init graceful shutdown for GUI
- add python modules for qemu protocols: QMP (hardware interactions) and QGA (guest service interaction)
- refactor state directory: remove name from path (already contains url)
- add impure vm test for basic qmp interaction
- simplify existing vm persistance test (factor out shared code)
- integrate graceful shutdown into GUI

the GUI integration still needs to be improved later:
- add fallback in case system doesn't react to powerdown button
- shutdown GUI switch fails if VM hasn't been started yet, and then remains in a wrong position
2024-02-09 19:55:18 +07:00
Jörg Thalheim
584299e199 rename deployment address to target address
This is a prepares having a build server for deployment
2024-02-02 16:39:29 +07:00
DavHau
5bdbb43490 qemu: init python modules for qmp and qga 2024-02-01 12:32:21 +07:00
DavHau
af9b4c32e8 Reapply "vm-state: fix and improve testing"
This reverts commit a429ab5d3c.

vm-state: revert sysusers, improve testing

zerotier: enable persistence

vm-state: cleanup tests
2024-01-31 11:02:16 +07:00
DavHau
a429ab5d3c Revert "vm-state: fix and improve testing"
This reverts commit 41c97a5fce.
2024-01-29 15:16:10 +07:00
DavHau
41c97a5fce vm-state: fix and improve testing
Also adds qemu qga protocol implementation to execute commands
2024-01-26 19:41:05 +07:00
lassulus
96c92a4cc0 test_vm_persistance: substitute clan-core repo 2024-01-24 15:49:12 +01:00
lassulus
b98e15d6d7 test_vm_persistance: add age keys 2024-01-24 15:49:12 +01:00
DavHau
368931c5af VMs: ensure state dirs don't collide between clans 2024-01-09 17:22:48 +07:00
DavHau
5cdd9a1817 VMs: port vm_persistence test to python 2024-01-09 14:47:33 +07:00
Jörg Thalheim
4a19e3af95 rename vms create to vms run 2023-11-24 15:00:08 +01:00
lassulus
082d628497 clan_cli: flake_name -> flake_dir 2023-11-15 16:23:28 +01: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
lassulus
efafe6f0e3 clan-cli secrets: flake_name -> flake_dir 2023-11-05 16:58:48 +01: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
lassulus
cc7f96961e tests: add fixtures to test_vms_cli 2023-10-05 15:56:15 +02:00
Jörg Thalheim
e27efd4035 add test for vm cli 2023-10-03 17:24:08 +02:00