Jörg Thalheim
81d02bb218
tests: rewrite port allocation function
2023-08-27 09:34:36 +02:00
DavHau
b55ceec40c
clan-config: use pinned nixpkgs + fix test flake
2023-08-26 23:33:32 +02:00
DavHau
8c7ee25dc9
webui: fixes for machines endpoint
...
- fix machines settings file location
- raise 404 if machine doesn't exist
- improve machine api test
2023-08-26 14:17:25 +02:00
Jörg Thalheim
672e760e2a
replace mock_env with monkeypatch
2023-08-26 11:45:09 +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
DavHau
fb76ad45e8
webui: implement /api/machines/{name}/schema
2023-08-25 21:26:30 +02:00
Jörg Thalheim
33b43ae146
add tests for machines api
2023-08-24 19:16:44 +02:00
Jörg Thalheim
58adf91af8
test machine subcommand
2023-08-24 18:28:33 +02:00
Jörg Thalheim
6adfadd8b9
re-enable config subcommand if CLAN_OPTIONS_FILE is set
2023-08-24 18:28:33 +02:00
Jörg Thalheim
dcbf1613fb
delete test_cli test
...
we already cover this in integration tests
2023-08-24 18:28:33 +02:00
Jörg Thalheim
d600a927ea
tests: generalize secret cli parser to work for all cli commands
2023-08-24 18:28:33 +02:00
Jörg Thalheim
3b099ccb89
clan-cli: move arg parsing to extra method
2023-08-24 18:28:33 +02:00
Jörg Thalheim
56542ca5ef
mv update command to machines update command
2023-08-24 16:25:06 +02:00
Jörg Thalheim
13a6386004
add integration test for webui
2023-08-24 14:09:19 +02:00
DavHau
b16f314c80
clan-config: add option --quiet
2023-08-23 12:25:02 +02:00
DavHau
999fbe0d89
clan-config: add readme
...
Also add capability of reading an option value
2023-08-23 01:01:07 +02:00
DavHau
780fd881c3
clan-config: fix tests
2023-08-22 21:17:47 +00:00
DavHau
48686591d8
clan-config: improve and add flake-parts module for clan-config
2023-08-22 21:17:47 +00:00
DavHau
52d6798315
clan-config: stop using jsonschema at all for CLI
...
- instead use options.json coming from nixosOptionsDoc
2023-08-15 15:48:17 +02:00
DavHau
348e503789
clan-config: get rid of jsonschema dependency
2023-08-15 13:29:48 +02:00
Jörg Thalheim
51f40a4f09
test_update_cli: also test --help
2023-08-11 17:11:47 +02:00
Jörg Thalheim
a096d8ddcc
clan-cli: add update command
2023-08-11 16:10:25 +02:00
Jörg Thalheim
c9b77e5927
clan-cli/tests/clan_flake: add flake.nix
2023-08-11 16:10:12 +02:00
Jörg Thalheim
8bf809d0ec
clan-cli/sshd: fix pytest warnings
2023-08-11 16:10:12 +02:00
Jörg Thalheim
2a31b1d65b
add host_group fixture
2023-08-11 16:10:12 +02:00
Jörg Thalheim
b3a665cb19
clan-cli/ssh: rename Group -> HostGroup
2023-08-11 16:10:12 +02:00
DavHau
0a9b914ad5
clan-config: improve jsonschema arg parsing
...
- output json to stdout after success
- expect args in the style: `foo.bar = baz`
- handle different input types
- cast input types on best effort basis
- throw meaningful errors
2023-08-11 00:05:52 +02:00
DavHau
d04278e9b1
clan-config: add tests
2023-08-10 21:17:17 +02:00
clan-bot
2fa0c38625
Merge pull request 'add test for remote ssh commands' ( #115 ) from Mic92-mic92 into main
2023-08-10 09:05:48 +00:00
Jörg Thalheim
a17baa4861
add test for remote ssh commands
2023-08-10 11:05:05 +02:00
clan-bot
dd9f1820a5
Merge pull request 'add test for local commands' ( #114 ) from Mic92-mic92 into main
2023-08-09 14:24:06 +00:00
Jörg Thalheim
f8f9cd457a
add test for local commands
2023-08-09 16:23:15 +02:00
DavHau
7262208a4c
clanLib.jsonschema: move tests from pkgs/clan-cli
2023-08-09 16:05:33 +02:00
DavHau
9438a9eb5f
clan-config: move jsonschema lib to clanLib
2023-08-09 16:05:33 +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
8fea55da32
move ssh cli to cli submodule
2023-08-09 15:46:34 +02:00
Jörg Thalheim
daf1058312
clan-cli: fix secrets test
2023-08-09 10:50:48 +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
2988532909
allow to set groups/admins/users when setting secrets
2023-08-08 19:40:35 +02:00
Jörg Thalheim
6f9aaef56a
add option to import sops secrets with groups,users,machines,prefixes
2023-08-08 18:46:37 +02:00
Jörg Thalheim
d8c2df2e72
add test for import-sops command
2023-08-08 16:28:38 +02:00
Jörg Thalheim
0533948085
fix rotating keys with sops
2023-08-08 13:44:15 +02:00
DavHau
b88ac7a2bf
clan-config: init
...
- nixos-modules to jsonschema converter
- nix unit testing via adisbladis/nix-unit
- clan config: configuration CLI for nixos-modules
2023-08-02 20:04:16 +02:00
Jörg Thalheim
dab483339a
test list/remove secret
2023-08-02 12:00:32 +00:00
Jörg Thalheim
658c76336f
add secrets integration
...
clan-cli: also depend on age for secrets
2023-08-02 09:19:14 +00:00
Jörg Thalheim
6e7c34cd5c
tests/clan-flake: yield flake path rather than homedir
2023-07-28 15:01:37 +02:00
Jörg Thalheim
bc7dada58c
tests/clan_flake: fix fixture name
2023-07-28 13:47:32 +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
88a2c2656a
get_clan_flake_toplevel: fix check
2023-07-28 12:36:01 +02:00