Commit Graph

28 Commits

Author SHA1 Message Date
Jörg Thalheim
e150b37fb8 enable ASYNC, DTZ, YTT and EM lints 2024-09-02 14:07:06 +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
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
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
Qubasa
d6d8a88549 clan-vm-manager: Working pytest skeleton. clan-cli: Fixing devshell depending on itself 2024-03-24 23:36:00 +01:00
Qubasa
f087f527cc Removed duplicate logging messages 2024-01-11 22:46:29 +01:00
Qubasa
999747c5fc Deleted everything webui 2023-12-14 18:47:14 +01:00
Jörg Thalheim
0e91f8721f prefix nixpkgs# explicitly in nix_shell
This makes the function usage less confusing (you can now tell from the call side what are flags and what is passed to nix-shell) and allows to use different flakes to download packages.
2023-12-08 15:14:14 +01: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
DavHau
6a359c0a2f clan-cli: add git.commit_file() to auto commit files if inside a git
- commit only if inside a git repo
- commit only the specified file and nothing else
- auto-generate commit message if not specified
2023-09-21 14:07:54 +02:00
Jörg Thalheim
87f0b090ef cli: rename clan_flake to test_flake 2023-09-15 12:36:16 +02:00
Jörg Thalheim
02f421546c rename machine_flake back to clan_flake 2023-09-14 17:06:07 +02:00
Jörg Thalheim
2048ffccb0 drop clan_flake fixture 2023-09-14 16:57:48 +02:00
Jörg Thalheim
4905e0cecd move machine_flake fixture to its own file 2023-09-14 16:49:02 +02:00
Jörg Thalheim
3bdd3af248 cli: fix nixpkgs unfree import 2023-09-06 17:37:41 +02:00
Jörg Thalheim
4ac91ccdcb drop clan flake monkeypatch 2023-09-06 16:04:00 +02:00
Jörg Thalheim
fb7c77690a replace environment variable with nixpkgs directory
In this directory we generate all the files that we need to load nixpkgs.
This seems more robust than all those environment variables that may or not may be set.
2023-08-26 11:45:09 +02:00
DavHau
518bf4197f webui: tests for machine config endpoints 2023-08-26 08:46:53 +02:00
Jörg Thalheim
33b43ae146 add tests for machines api 2023-08-24 19:16:44 +02:00
Jörg Thalheim
2a31b1d65b add host_group fixture 2023-08-11 16:10:12 +02:00
Jörg Thalheim
a17baa4861 add test for remote ssh commands 2023-08-10 11:05:05 +02:00
Jörg Thalheim
d977499ffe rename cli tests to have a common suffix
rename test_import_sops -> test_import_sops
2023-08-09 15:54:27 +02:00
Jörg Thalheim
68905fc233 don't add user to a secret if they already can access the secret
If the user is part of a group we don't need to add them explicitly
2023-08-09 10:17:30 +02:00
Jörg Thalheim
d8c2df2e72 add test for import-sops command 2023-08-08 16:28:38 +02:00
Jörg Thalheim
29c711db30 add clan_flake fixture to setup a temporary clan 2023-07-28 12:54:49 +02:00
Jörg Thalheim
5e5fbfcf06 write test for get_clan_flake_toplevel 2023-07-28 10:22:25 +00:00
Jörg Thalheim
df6e94b20e move environment to helpers module
This fixes registering pytest plugins
2023-07-28 10:22:25 +00:00