CI & Build / Python lint (push) Successful in 2s
CI & Build / Build now, or wait for Android? (push) Successful in 2s
Android / Build, or is the channel already serving this? (push) Successful in 3s
Desktop (Tauri) / Build, or is the channel already serving this? (push) Successful in 2s
CI & Build / TypeScript typecheck (push) Successful in 7s
CI & Build / Python tests (push) Successful in 15s
CI & Build / integration (push) Successful in 45s
CI & Build / Build & push image (push) Skipped
Desktop (Tauri) / Windows installer (cross-compiled) (push) Successful in 4m17s
Desktop (Tauri) / Tauri desktop (Linux) (push) Successful in 7m33s
Desktop (Tauri) / Update manifest (push) Successful in 7s
Android / Kotlin + Rust (APK) (push) Successful in 11m25s
Step 2 of milestone 481. The operator chose a full rename (Scribe note 5071), so this goes past the display strings into the identities: - src/thoughtsync → src/inkwell; every import, the Dockerfile and both compose commands, alembic env, pyproject - THOUGHTSYNC_* → INKWELL_* (database URL, secret key, log level, tag/port/bind) - container data dir /var/thoughtsync → /var/inkwell - image git.fabledsword.com/bvandeusen/inkwell; Postgres user/db default inkwell; CI's integration service follows - the files the image serves are inkwell.*. fetch-clients.sh still fetches the thoughtsync-named release assets, because the lanes that publish them are renamed in steps 3 and 4 - exports are written with app "inkwell" Two deliberate exceptions, both because data rides on them: - compose volumes are now named explicitly and overridable (INKWELL_DB_VOLUME, INKWELL_DATA_VOLUME), so a deployment installed as ThoughtSync points at the volumes and DB identity it already has. .env.example says exactly what to set - import still accepts app "thoughtsync", because exports written before the rename are backups. Tested both ways Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
47 lines
1.2 KiB
Python
47 lines
1.2 KiB
Python
import uuid
|
|
|
|
import pytest
|
|
|
|
from inkwell.app import create_app
|
|
from inkwell.models.label import Label
|
|
from inkwell.serialize import serialize_label
|
|
|
|
|
|
@pytest.fixture
|
|
def app():
|
|
return create_app()
|
|
|
|
|
|
def test_serialize_label_shape():
|
|
# The base {id, name, color} shape the labels API and (S4) sync deltas both build on.
|
|
lid = uuid.uuid4()
|
|
assert serialize_label(Label(id=lid, name="ideas", color="teal")) == {
|
|
"id": str(lid),
|
|
"name": "ideas",
|
|
"color": "teal",
|
|
}
|
|
|
|
|
|
async def test_labels_requires_auth(app):
|
|
client = app.test_client()
|
|
resp = await client.get("/api/labels")
|
|
assert resp.status_code == 401
|
|
|
|
|
|
async def test_set_note_labels_requires_auth(app):
|
|
client = app.test_client()
|
|
resp = await client.put(
|
|
"/api/notes/00000000-0000-0000-0000-000000000000/labels",
|
|
json={"label_ids": []},
|
|
)
|
|
assert resp.status_code == 401
|
|
|
|
|
|
async def test_merge_label_requires_auth(app):
|
|
client = app.test_client()
|
|
resp = await client.post(
|
|
"/api/labels/00000000-0000-0000-0000-000000000000/merge",
|
|
json={"into": "00000000-0000-0000-0000-000000000001"},
|
|
)
|
|
assert resp.status_code == 401
|