Initial import of LogDarioSeq baseline

Establishes version control for the personal Logseq DB fork before
starting the server-client architecture migration and domain features
described in docs/agent-guide and the approved implementation plan.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-25 15:32:15 +02:00
commit 40631362b3
2016 changed files with 543898 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
(ns logseq.db-sync.node-config-test
(:require [cljs.test :refer [deftest is testing]]
[logseq.db-sync.node.config :as config]))
(defn- throws? [f]
(try
(f)
false
(catch :default _ true)))
(deftest normalize-config-drops-unknown-keys-test
(let [cfg (config/normalize-config {:port 7777
:unknown-key "value"
:legacy-auth-key "value"})]
(is (= 7777 (:port cfg)))
(is (nil? (:unknown-key cfg)))
(is (nil? (:legacy-auth-key cfg)))))
(deftest normalize-config-storage-driver-test
(testing "sqlite storage driver accepted"
(let [cfg (config/normalize-config {:storage-driver "sqlite"})]
(is (= "sqlite" (:storage-driver cfg)))))
(testing "unsupported storage driver throws"
(is (throws? #(config/normalize-config {:storage-driver "other"})))))
(deftest normalize-config-assets-driver-test
(testing "filesystem assets driver accepted"
(let [cfg (config/normalize-config {:assets-driver "filesystem"})]
(is (= "filesystem" (:assets-driver cfg)))))
(testing "unsupported assets driver throws"
(is (throws? #(config/normalize-config {:assets-driver "s3"})))))