tools: uv + Bruno + compose file

Use uv to handle project
Add a Bruno collection to tests API calls
Add a compose.yaml file to run with docker
This commit is contained in:
2025-05-30 14:34:40 +02:00
parent 8c46fdd0f0
commit ffaeb00e3f
12 changed files with 307 additions and 5 deletions

11
bruno/README.md Normal file
View File

@@ -0,0 +1,11 @@
# What?
Do a link to `.env` file at the root of the project:
```sh
$ pwd
> [...]./prometheus-immich-exporter/bruno
$ ln -s ../.env
```
Open collection with [Bruno](https://www.usebruno.com), and voilà!

15
bruno/bruno.json Normal file
View File

@@ -0,0 +1,15 @@
{
"version": "1",
"name": "immich",
"type": "collection",
"ignore": [
"node_modules",
".git"
],
"size": 0,
"filesCount": 0,
"presets": {
"requestType": "http",
"requestUrl": "http://{{host}}:{{port}}/api/server/"
}
}

9
bruno/collection.bru Normal file
View File

@@ -0,0 +1,9 @@
auth {
mode: apikey
}
auth:apikey {
key: x-api-key
value: {{api_token}}
placement: header
}

View File

@@ -0,0 +1,5 @@
vars {
port: {{process.env.IMMICH_PORT}}
host: {{process.env.IMMICH_HOST}}
api_token: {{process.env.IMMICH_API_TOKEN}}
}

11
bruno/storage.bru Normal file
View File

@@ -0,0 +1,11 @@
meta {
name: storage
type: http
seq: 2
}
get {
url: http://{{host}}:{{port}}/api/server/storage
body: none
auth: inherit
}

11
bruno/version.bru Normal file
View File

@@ -0,0 +1,11 @@
meta {
name: version
type: http
seq: 1
}
get {
url: http://{{host}}:{{port}}/api/server/version
body: none
auth: inherit
}