Jörg Thalheim
98d566c46e
add test for parsing ssh options
2025-03-11 11:27:04 +01:00
Louis Opter
5b821c610d
clan-cli: add unit tests for test_parse_deployment_address
...
Follow-up to #2899 , more thorough than #2909 .
2025-02-25 05:31:49 +00:00
lassulus
5ac629f549
clan-cli: use new flake caching for machines
2025-02-23 15:58:03 +01:00
Qubasa
faee6c2a79
clan-cli: Re-add test_copy_from_nixstore_symlink test but mark it impure
2025-02-17 14:21:50 +07:00
Qubasa
a5e32f9b6d
clan-cli: Fix clan flakes create inside an already existing git repo
2025-02-17 13:23:31 +07:00
Qubasa
89e3793831
clan-cli: Add CLAN_TEST_STORE env var to clan-pytest-without-core
2025-02-17 13:19:45 +07:00
lassulus
d5e391ecc8
clan-cli flake caching: fix selectors not merging
2025-02-15 09:59:41 +00:00
Johannes Kirschbauer
153b5560c3
Cli: delete machines bugfix. Dont modify the inventory in other places
2025-02-15 09:03:54 +07:00
Johannes Kirschbauer
2412513ad4
Inventory: init delete api
2025-02-15 09:03:46 +07:00
Jörg Thalheim
d3bd120a04
fix system.stateVersion
2025-02-14 12:22:26 +07:00
Qubasa
b138cfcd69
clan-cli: Fix symlink issue with copy_from_nixstore, add test for it. Also add more comprehensive clan template tests
2025-02-13 15:34:21 +07:00
Louis Opter
5a6038f742
clan-cli: secrets machines remove: update secrets after removing the key
...
Quick follow up to PR #2781 , this commit does the same kind of logic but
for machines instead of users and groups.
Note that this only affects the `clan secrets machines remove`
sub-command, and that `clan machines delete` still leaves unusable
secrets & vars behind. This can be addressed in a different change.
2025-02-13 03:53:23 +00:00
Qubasa
23b57b0a3a
clan-cli: Mark new test as impure
2025-02-10 20:36:55 +07:00
Qubasa
9ab81a9c5d
clan-cli: Add one more test for checking Flake with git+file:
2025-02-10 20:36:55 +07:00
lassulus
0872b781d7
clan-cli: add persistant flake caching
2025-02-10 13:29:01 +00:00
Johannes Kirschbauer
9b706c148b
Inventory: automatically create emtpy file on write
2025-02-10 09:02:23 +00:00
Johannes Kirschbauer
dee284d669
CLI: machine create use patch inventory for partial updates
2025-02-10 09:02:23 +00:00
lassulus
718e553211
clan_cli flake caching: support outPath
2025-02-10 04:33:37 +00:00
lassulus
32748c14f4
clan_cli machines: use Flake instead of FlakeId
2025-02-07 06:26:09 +01:00
a-kenji
6d2845c645
pkgs/cli: Rename create_file -> persist
2025-02-06 14:59:59 +00:00
lassulus
51d65873a7
clan-cli: test_flake_caching: add actual flake caching test
2025-02-05 10:17:37 +00:00
a-kenji
f2ab298caa
vars/interface: Change prompt.persist default to false
...
Change `prompt.persist` default to false.
We want a consistent default that is not conditionally dependent on
other values.
This makes communication on how the functionality is used more
consistent and easier understood.
2025-02-04 07:47:22 +00:00
Louis Opter
e88c8a8f2d
clan-cli: do not skip secrets.update_secrets when a group is removed
...
We need to remove all keys that were in the group from affected secrets.
With this change we now take `group_name` as an argument in
`{add,remove}_member`, which is a little bit more readable than
`group_folder.parent.name`, and helps DRY the code a bit.
2025-02-04 03:13:20 +00:00
Louis Opter
c99296aae8
clan-cli: improve tests on clan secrets …
...
When users or groups are updated :
- Check that keys are properly updated on sops secrets;
- Check that no dangling symlinks are left behind in sops secrets.
And when an user is removed from the clan, check that it is removed from
the groups it belonged to.
This doesn't check this works for vars explicitly, since they share the
same logic, see `secret_paths.extend(list_vars_secrets(flake_dir))` in
commit 7466445653 .
Those improvements allow us to validate that #2659 is indeed fixed, and
tell us that we need to make the same kind of fixes for machines and
groups. For groups this is straightforward, and for machines, when one
is deleted, I wanna discuss first whether we want to delete all its
secrets as well.
2025-02-04 03:13:20 +00:00
a-kenji
1694f8b3a8
pkgs/clan: Fix typos
2025-02-02 23:20:39 +07:00
lassulus
c746b84a6f
test_api_dataclass_compat: exlcude flake.py
2025-02-02 11:52:36 +00:00
lassulus
fe2cfd3b37
clan-cli: add a Flake class with caching
2025-02-02 11:52:36 +00:00
Qubasa
0f4cdd31cd
clan-cli: Make clan machines create use templating.py
2025-01-31 18:07:48 +07:00
Qubasa
d770830c03
clan-cli: Add test_clan_nix_attrset.py and minor fixups
2025-01-31 16:36:20 +07:00
Qubasa
e36654daa1
clan: Add autoloaded clanModules from flake inputs. Rename 'directory' to 'self' in buildClan
2025-01-24 12:32:04 +07:00
Johannes Kirschbauer
906126f91f
Vars/tests: secrets dont raise backend error depending on the previous backend
2025-01-22 09:02:55 +00:00
Pablo Ovelleiro Corral
7a17a04698
Migrate borgbackup module to vars
2025-01-16 13:14:24 +01:00
Johannes Kirschbauer
4000571550
Fix: remove password from facts store tests
2025-01-14 17:19:51 +01:00
Johannes Kirschbauer
a53367bd11
Fix: secret facts store test
2025-01-14 17:19:50 +01:00
Jörg Thalheim
e2aa66d86f
reformat after update
2025-01-14 15:30:29 +01:00
DavHau
bbe37a998f
vars: rename createFile -> persist
2025-01-11 04:19:46 +00:00
Johannes Kirschbauer
c6fe4f2625
API/vars: use string based interfaces to get and set vars to avoid state mutations
2025-01-10 12:06:01 +00:00
Johannes Kirschbauer
6b209f1008
API/vars: simplify get/set prompts
2025-01-07 11:09:58 +01:00
Johannes Kirschbauer
08f6cdc43f
Serde: fix enum type conversion, ensure roundtrip stability
2025-01-03 16:31:25 +01:00
Jörg Thalheim
7466445653
updating groups/machines/users keys now also update vars secrets
2024-12-17 19:24:30 +01:00
Jörg Thalheim
9d9e5bdd26
vars/tests: merge test_build_scripts_for_correct_system into test_generate_secret_for_multiple_machines
2024-12-17 17:39:27 +01:00
Jörg Thalheim
1255c3108e
merge three prompt type tests into one
2024-12-17 17:39:19 +01:00
Jörg Thalheim
5ebbb3ee98
vars: remove duplicate test
2024-12-17 17:21:10 +01:00
Jörg Thalheim
ab1626d0eb
var: merge migration tests into one
2024-12-17 17:21:10 +01:00
Jörg Thalheim
0ab3ec5e16
vars: delete duplicate shared flag test
2024-12-17 17:21:01 +01:00
Jörg Thalheim
8cc41f543a
clan_cli: merge four var tests into one
2024-12-17 17:21:01 +01:00
DavHau
7b3b1018aa
vars: commit files for clan vars set
...
fixes #2601
2024-12-17 15:56:08 +07:00
DavHau
5d47622a78
build-clan: fix bug where vars generator scripts are built for target system instead of local system
2024-12-16 19:20:17 +07:00
lassulus
0ce51a4e5c
cli test_vars: make output check less sensible to nix output
2024-12-14 13:42:31 +01:00
Qubasa
e490207d12
clan-cli: Rework 'clan ssh' command, improve Tor support.
2024-12-13 00:11:18 +01:00