Commit Graph

24 Commits

Author SHA1 Message Date
Jörg Thalheim
f3512b853a remove nix_shell_legacy 2025-04-16 21:03:58 +02:00
Jörg Thalheim
837789010e rename nix_shell_legacy to nix_shell and run_cmd to nix_shell
Than it's more obvious that we need to migrate.
2025-04-16 18:27:01 +00:00
Jörg Thalheim
0b4e896af3 migrate clan history to clan-vm-manager
this functionality is not really useful or used in clan-vm-manager and
therefore should live in the clan-vm-manager.

Not porting the test for now because we probably get rid of the clan-vm-manager soon in favour of the UI.
2025-04-16 14:51:37 +02:00
lassulus
62deb1f89b Merge pull request 'fast-vars-gen' (#3216) from fast-vars-gen into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3216
2025-04-15 07:11:06 +00:00
Jörg Thalheim
833798f650 test_vars_deployment: skip on macOS for now
we can not run vms on macOS at the moment.
2025-04-14 15:47:55 +00:00
lassulus
2df82ae61f clan_cli test_vars: start refactoring to use caching 2025-04-14 14:28:59 +02:00
Qubasa
b6753211e9 clan-cli: Fix failing tests. Add a big FIXME for clan.select 2025-04-11 23:36:02 +02:00
Qubasa
3bd766e0a0 clan-cli: Fix single file upload in upload.py, add test for edge case 2025-04-11 19:08:13 +02:00
Qubasa
5a266ecdde clan-cli: Fixup more failing tests because of quoting issues 2025-04-10 14:33:54 +02:00
Qubasa
3fbc661ed9 clan-cli: Change shellcheck to shellcheck-minimal 2025-04-10 01:54:00 +02:00
RTUnreal
37a627f8bc pkgs/clan-cli: fix test which are using vars shellcheck 2025-04-09 19:44:00 +02:00
Johannes Kirschbauer
61d1cf32ab chore(clan/pytest): discover all test files in the tree 2025-04-09 18:54:57 +02:00
Johannes Kirschbauer
872aa8e5b6 fix(clan/machines): move machineClass attribute selector and add a unit test for class detection 2025-04-09 18:29:43 +02:00
hsjobeki
af03224d40 Merge pull request 'test(clan/inventory): test deserialization of different inventories' (#3258) from hsjobeki/clan-core:inventory-serde into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3258
2025-04-09 16:07:58 +00:00
Johannes Kirschbauer
bfd2968509 test(clan/inventory): test deserialization of different inventories 2025-04-09 18:00:00 +02:00
hsjobeki
963248ccff Merge pull request 'treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib'' (#3263) from hsjobeki/clan-core:lib-cleanup into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3263
2025-04-09 15:10:42 +00:00
Brian McGee
aa4fe27e51 feat(clan-cli): support multiple keys for a user 2025-04-09 09:58:58 +00:00
Johannes Kirschbauer
e37f16f47a treewide(clanLib): rename all occurences of {clan-core,self}.lib to 'clanLib' 2025-04-09 11:32:46 +02:00
DavHau
ba1ad5bd43 sops: prioritize SOPS_AGE_KEY_FILE over local key
... instead of loading both keys and raise an error

This is important for testing when one wants to override SOPS_AGE_KEY_FILE

New prio: `SOPS_AGE_KEY` > `SOPS_AGE_KEY_FILE` > `~/.config/sops/age/keys.txt`
2025-04-09 08:45:34 +00:00
DavHau
82b6a52c7c vars: add feature --no-sandbox
Raise warning if sandbox cannot be used -> request user to run with --no-sandbox
2025-04-09 15:02:20 +07:00
Johannes Kirschbauer
0ced167912 fix(clan_app/test): fixup after rebase 2025-04-08 21:38:55 +02:00
Johannes Kirschbauer
e9ce7376f2 fix(clan_cli/tests): fix some imports after rebase 2025-04-08 20:26:38 +02:00
Johannes Kirschbauer
4da6cf594d Tests: exclude test folder itself from autmatic dataclass checks 2025-04-08 20:12:03 +02:00
a-kenji
fae630842d pkgs/cli: Move the test folder inside the python module
Move the `tests` folder to `clan_cli/tests`.

As we now want part of our tests to live next to the functions that are
tested - tests that are not in the `/tests` module also need access to
the configured test fixtures that are exposed by the `pytest_plugins`
declaration.

The following folder structure doesn't support this model:

```
├── clan_cli
│   ├── api
│   │    └── api_init_test.py
├── tests/
│   ├── conftest.py
│   └── ...
```

Here `api_init_test.py` even when importing the test functions will not
have the fixtures configured.

There is a way to configure python to import the fixtures from another
[`project/module`](https://docs.pytest.org/en/stable/how-to/fixtures.html#using-fixtures-from-other-projects), but this seems to *generally* be discouraged.

So moving the `conftest.py` to the toplevel and the `/tests` folder into
the toplevel seems to be a sensible choice choice.
2025-04-08 20:12:01 +02:00