API: Added Path validators. api/flake/create inits git repo. Fixed vscode interpreter problem

This commit is contained in:
Qubasa
2023-10-12 22:46:32 +02:00
parent cc96fcf916
commit fa5f39f226
18 changed files with 186 additions and 56 deletions

View File

@@ -21,12 +21,12 @@ def test_create_flake_api(
response = api.post(
"/api/flake/create",
json=dict(
destination=flake_dir_str,
dest=flake_dir_str,
url="git+https://git.clan.lol/clan/clan-core#new-clan",
),
)
assert response.status_code == 201, "Failed to create flake"
assert response.status_code == 201, f"Failed to create flake {response.text}"
assert (flake_dir / ".clan-flake").exists()
assert (flake_dir / "flake.nix").exists()