Commit Graph

152 Commits

Author SHA1 Message Date
DavHau
607c52149f PUT /machines/{name}/config; ensure is idempotent 2023-10-24 18:48:14 +01:00
DavHau
177be69eda PUT api/machines/{name}/config: ensure only valid config is ever written
- add CLAN_MACHINE_SETTINGS_FILE variable to temporarily override the machine settings file
- do a dry-run evaluation first with the new config before persisting it.
2023-10-24 18:40:48 +01:00
DavHau
f1e7495806 machines: add endpoint machines/{name}/ verify 2023-10-24 16:31:37 +01:00
Qubasa
942aa10a31 API: Added /api/flake/create. Fixed vscode search settings. Moved clan create to clan flake create 2023-10-09 14:01:34 +02:00
DavHau
cc8f99d06c clan join: test create vm for clan join
This adds a vm create test for the `clan join` scenario where:
  - there is no local clan to write changes to
  - a machine from a remote flake needs to be built and run
  - no users and no secrets need to be or can be managed (no flake to write files to)
2023-10-06 19:15:25 +02:00
lassulus
cc7f96961e tests: add fixtures to test_vms_cli 2023-10-05 15:56:15 +02:00
Jörg Thalheim
5180b6655e test_secrets_password_store: create gpghome with save permissions 2023-10-04 19:56:18 +02:00
lassulus
7a224c0130 test_vms_api: supply age key for secret creation 2023-10-04 18:13:25 +02:00
lassulus
b46aaac568 tests test_flake: disable dhcp 2023-10-04 17:52:06 +02:00
DavHau
a2f729fb2a webui: open browser in new window
This gets closer to an app like feeling
2023-10-04 17:26:55 +02:00
Jörg Thalheim
b0b680c39d improve task manager to report exceptions better 2023-10-04 16:49:58 +02:00
Jörg Thalheim
e3e486b2fd rename test_basic to test_create_flake 2023-10-04 11:01:12 +02:00
Jörg Thalheim
6ffe39a915 make vm test also work in ci 2023-10-03 18:50:14 +02:00
Jörg Thalheim
c5b0787034 also test that updating a group works 2023-10-03 16:15:36 +00:00
Jörg Thalheim
e27efd4035 add test for vm cli 2023-10-03 17:24:08 +02:00
Jörg Thalheim
844ed6dddd clan-cli/tests: skip tests if has no /dev/kvm 2023-10-03 17:24:08 +02:00
Qubasa
499c42fd20 nix fmt 2023-10-03 14:39:29 +02:00
Qubasa
42d81230c4 Merge branch 'Qubasa-main' of git.clan.lol:clan/clan-core 2023-10-03 13:24:31 +02:00
Qubasa
f5bead7403 API: Added test for inspect_flake 2023-10-03 13:19:20 +02:00
Qubasa
c78af6243c Fixed failing tests 2023-10-03 13:15:01 +02:00
Qubasa
e0ef03fa03 API: Added test for inspect_flake 2023-10-03 12:50:47 +02:00
Qubasa
14831e871f Fixed failing tests 2023-10-03 11:51:31 +02:00
Johannes Kirschbauer
1acfded849 Beyoncé rule 2023-10-03 11:21:34 +02:00
Qubasa
912d6428a3 API: Added endpoint & test for /api/flake/attrs 2023-10-01 12:50:54 +02:00
Qubasa
d805c4b069 API: Improved vm_status and added some tests. Skip vm tests in VM 2023-09-30 11:08:42 +02:00
lassulus
34dec8d194 tests: add test_secrets_password_store 2023-09-29 20:05:35 +02:00
lassulus
0db337d57e clan-cli secrets upload: secrets are populated into tmpdir 2023-09-29 20:05:35 +02:00
Jörg Thalheim
0178be0231 zerotier: document mdns ports; drop duplicate udp firewall rules
the nixos module already opens the zerotier port
2023-09-28 17:58:42 +02:00
Jörg Thalheim
b42d0598bc also generate zerotier secret for vm 2023-09-28 17:57:44 +02:00
Jörg Thalheim
f5769f5e69 pregenerate ssh_host keys for tests
Then we are free to choose where to put the ssh config
2023-09-28 16:31:59 +02:00
Jörg Thalheim
e550f32e96 clanInternals.machines: expose information as json 2023-09-27 18:42:49 +02:00
Jörg Thalheim
55551f9211 fix clan-pytest build 2023-09-27 16:20:05 +02:00
Jörg Thalheim
2a7c8b6b1a move temporary directory to .direnv 2023-09-27 16:13:04 +02:00
Jörg Thalheim
ded120d065 drop requirement for importing qemu-vm.nix 2023-09-27 14:54:01 +02:00
Jörg Thalheim
6d4c9e39aa cli: fix remaining typing errors 2023-09-27 09:47:50 +00:00
Jörg Thalheim
152067be20 make vm terminate after boot 2023-09-27 09:47:50 +00:00
Qubasa
1a63bf265a Completely working log streaming 2023-09-27 09:47:50 +00:00
Qubasa
7c93962e35 Working log streaming 2023-09-27 09:47:50 +00:00
Qubasa
d73dc7048b Working log streaming 2023-09-27 09:47:50 +00:00
Qubasa
c96b339d94 Extracted threadpool to task_manager.py 2023-09-27 09:47:50 +00:00
Qubasa
b535f745e0 Added test 2023-09-27 09:47:50 +00:00
Qubasa
da02c7f4ae Started working on vm_create 2023-09-27 09:47:50 +00:00
Jörg Thalheim
2e88454b5a move zerotier secret generation into nixos module 2023-09-26 17:57:43 +02:00
Jörg Thalheim
ec2b56eb94 create test_flake unique per test
otherwise we will have race conditions
2023-09-26 15:46:40 +02:00
DavHau
b952aaa818 clan config: support new types nullOr and passwdEntry 2023-09-24 14:24:48 +01:00
DavHau
1d3ec4c9c0 clan config: match dynamic options containing <name> 2023-09-24 13:04:37 +01:00
DavHau
e08c0b338d test_basics: add cli fixture 2023-09-22 19:23:23 +02:00
DavHau
9825c179a8 impure-tests: migrate bash to pytest and fix stuff 2023-09-22 18:32:28 +02:00
Jörg Thalheim
b482dcd466 make git idempotent 2023-09-22 16:38:46 +02:00
Jörg Thalheim
e3b2424d9d make git optional again 2023-09-22 16:07:39 +02:00