Commit Graph

195 Commits

Author SHA1 Message Date
Qubasa
841e9135fe clan-cli: Add passthru.sourceWithTest for container_test.py 2025-10-22 14:36:16 +02:00
Qubasa
3f07f6ac79 service_runner: add grouping feature 2025-10-14 17:32:21 +02:00
Johannes Kirschbauer
a296b8a1fe lib/cli: tests collect coverage 2025-10-14 17:07:19 +02:00
Michael Hoang
56558023a8 cli: support getting chroot-realpath from nixos-init if necessary 2025-10-03 13:02:40 +02:00
Qubasa
ec98cdf097 clan-cli: Increase test coverage for clan flash list 2025-09-20 02:15:33 +02:00
Michael Hoang
2152646df6 cli: don't hardcode system for flash list 2025-09-16 16:07:54 +02:00
DavHau
5d38824d8e cli/debug: fix web-pdb 2025-09-16 16:37:41 +07:00
DavHau
37a49a14f4 vars: fix re-generate behavior for dependencies of shared vars (#5001)
fixes https://git.clan.lol/clan/clan-core/issues/3791

This fixes multiple issues we had when re-generating shared vars.

Problem 1: shared vars are re-generated for each individual machine instead of just once (see #3791)

Problem 2: When a shared var was re-generated for one machine, dependent vars on other machines did not get re-generated, leading to broken state

Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/5001
2025-09-02 14:54:24 +00:00
Jörg Thalheim
899dba5a08 tests/vms: add chroot-realpath (needed on aarch64) 2025-08-19 15:53:46 +00:00
Jörg Thalheim
5b1a9d6848 vms: also prebuild for aarch64 2025-08-19 14:49:52 +02:00
Jörg Thalheim
4074a184b2 make vm test pure 2025-08-19 14:47:12 +02:00
Jörg Thalheim
c4d9b39a17 tests_secrets_generate: mark as pure 2025-08-15 12:51:20 +02:00
Jörg Thalheim
fbb28afb2f clan-cli/flash: make tests runnable in sandbox 2025-08-14 16:23:22 +02:00
Michael Hoang
a71a5880c1 treewide: reformat 2025-08-08 15:28:37 +10:00
Johannes Kirschbauer
5742b88777 cli: fix dot files not copied $out in buildPythonApplication
File such as .envrc, .gitignore where not copied into the package and thus missing in all templates
2025-07-15 23:33:34 +02:00
lassulus
2f0f9a9fba vars/password-store: replace passBackend option with passPackage
The `clan.core.vars.settings.passBackend` option has been replaced with
`clan.vars.password-store.passPackage` to provide better type safety and
clearer configuration.

Changes:
- Remove problematic mkRemovedOptionModule that caused circular dependency
- Add proper option definition with assertion-based migration
- Users setting the old option get clear migration instructions
- Normal evaluation continues to work for users not using the old option

Migration: Replace `clan.core.vars.settings.passBackend = "passage"`
with `clan.vars.password-store.passPackage = pkgs.passage`
2025-07-06 12:46:39 +02:00
Jörg Thalheim
4704fff151 drop more dependencies from pytest 2025-06-28 09:27:34 +02:00
Jörg Thalheim
aba15d517f consolidate clan-lib/clan-cli pytest into one test derivation
Than we can re-use test pytest worker better and it's less complex.
2025-06-28 09:11:14 +02:00
Jörg Thalheim
784828f966 drop virtviwer from testRuntimeDependencies 2025-06-28 09:11:14 +02:00
Jörg Thalheim
ad69b0a567 select: drop unused nixpkgs fallback 2025-06-27 19:30:45 +02:00
a-kenji
dd3662b81e pkgs/*: Remove pytest coverage testing from every single test run
There was no noticeable positive impact from having coverage reports on
every single test run.

While adding a separate command to check coverage might be added in the
future, the overhead of collecting the coverage for every test run made
seems not worth it currently.
2025-06-16 15:46:36 +00:00
DavHau
0060424152 tests: test vars generation for all clan service tests 2025-05-31 12:17:52 +07:00
Johannes Kirschbauer
3e160d6392 Fix(clan_cli): filter tests files from source 2025-05-28 11:34:12 +02:00
Johannes Kirschbauer
84622222d8 Fix(tests): fix failing pytests 2025-05-28 11:01:54 +02:00
Johannes Kirschbauer
8ea35b2b99 Tests(clan_lib): enable clan_lib pytests not marked with_core 2025-05-28 10:42:47 +02:00
Johannes Kirschbauer
e2520f6aa8 Test(InventoryPersistence): add persist integration tests 2025-05-21 17:55:43 +02:00
a-kenji
3662438f54 pkgs/clan: Clean select symlink up
If the symlink is not cleaned up this will break builds of the clan cli
from flakes with path references.
2025-05-21 14:18:26 +02:00
lassulus
03990ef7f0 clan-cli: clan_cli.templates -> clan_lib.templates 2025-05-20 16:08:02 +02:00
lassulus
ed89352ea1 clan-cli: clan_cli.dirs -> clan_lib.dirs 2025-05-20 12:08:30 +02:00
lassulus
cb74273da4 clan-cli: move clan_cli.nix to clan_lib.nix 2025-05-19 18:40:36 +02:00
lassulus
1c8b8bf83d clan_lib: move test_flake_caching into clan_lib flake folder 2025-05-18 21:35:56 +02:00
lassulus
5423b9af41 clan_cli: move flake class to clan_lib 2025-05-16 13:38:47 +02:00
Michael Hoang
c7ca8945a3 Revert "disable age-plugin-se for now on aarch64-linuxql"
This reverts commit ee8921273a.
2025-05-14 00:12:49 +10:00
Jörg Thalheim
0f7328ab89 filter out test files from clan-cli source
this means we can fix test without having to re-run the installation
tests.
2025-05-13 15:55:00 +02:00
Qubasa
b90812ecce clan-cli: add test_create in clan_lib test folder 2025-05-05 22:16:02 +02:00
Jörg Thalheim
ee8921273a disable age-plugin-se for now on aarch64-linuxql
disable
2025-05-04 09:07:06 +02:00
Michael Hoang
87e3e59ba0 cli: don't depend on the entire clan-core 2025-04-28 13:20:07 +10:00
Michael Hoang
2f95d2edf2 cli: fallback to bundled Nixpkgs 2025-04-28 13:10:00 +10:00
Michael Hoang
c3842902ac cli: don't use select from clanLib 2025-04-28 12:52:00 +10:00
Jörg Thalheim
d57c1ec7d7 nixpkgs source: delete existing symlink 2025-04-25 16:31:35 +02:00
Jörg Thalheim
4c78cce06e drop overrides of nix version 2025-04-22 18:20:35 +02:00
Jörg Thalheim
435627d854 rename CLAN_STATIC_PROGRAMS -> CLAN_PROVIDED_PACKAGES 2025-04-16 18:27:01 +00:00
Michael Hoang
fe523e928d treewide: switch back to pkgs.nix 2025-04-12 13:15:53 +02:00
Johannes Kirschbauer
7a72ff5297 chore(clan/cli): remove explizit dependency on jsonschema converter.
Regenerating the classes from json schema as part of the clan/cli is a bit redundant since we need to vendor the classes by hand anyways
The user can also not practically override the inventory options
I would disable this for now; until we really need it.
We now solely rely on CI checks failing if the classes are out of sync
2025-04-10 22:58:30 +02:00
Qubasa
3fbc661ed9 clan-cli: Change shellcheck to shellcheck-minimal 2025-04-10 01:54:00 +02:00
Qubasa
6b28e4e1d7 clan-cli: Add shellcheck as a runtimeDependencie 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
Mic92
b8e33babec Merge pull request 'installation: speed up by installing to localhost' (#3255) from flakiness into main
Reviewed-on: https://git.clan.lol/clan/clan-core/pulls/3255
2025-04-09 09:58:43 +00:00
Jörg Thalheim
d03971e583 don't expose all clan-depenencies as their own check attributes
this is expensive in CI to display.
2025-04-09 09:52:56 +00:00
Johannes Kirschbauer
69c717ae1f Tests: reconfigure pytest test folder after moving it into clan_cli 2025-04-08 20:13:13 +02:00