mirror of
https://github.com/vrtmrz/obsidian-livesync.git
synced 2026-10-24 01:53:20 +00:00
Integrate encrypted internal metadata in LiveSync
This commit is contained in:
1 parent
7b3b6ff854
commit
6c50505096
23 files changed
+1220
-61
No files matched your search
@@ -67,6 +67,22 @@ describe("active Replicator configuration identity", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("recreates the CouchDB connection when internal Metadata encryption becomes effective", () => {
|
||||
const active = configuredSettings({ usePathObfuscation: true, encryptInternalMetadata: false });
|
||||
const enabled = { ...active, encryptInternalMetadata: true };
|
||||
|
||||
expect(getCouchDBReplicatorConfigurationIdentity(enabled)).not.toBe(
|
||||
getCouchDBReplicatorConfigurationIdentity(active)
|
||||
);
|
||||
const inactive = { ...active, usePathObfuscation: false };
|
||||
expect(getCouchDBReplicatorConfigurationIdentity({ ...inactive, encryptInternalMetadata: true })).toBe(
|
||||
getCouchDBReplicatorConfigurationIdentity(inactive)
|
||||
);
|
||||
expect(getObjectStorageReplicatorConfigurationIdentity(enabled)).toBe(
|
||||
getObjectStorageReplicatorConfigurationIdentity(active)
|
||||
);
|
||||
});
|
||||
|
||||
it("projects only the active CouchDB authentication mode", () => {
|
||||
const basic = configuredSettings({ useJWT: false, jwtKey: "inactive-a" });
|
||||
expect(getCouchDBReplicatorConfigurationIdentity({ ...basic, jwtKey: "inactive-b" })).toBe(
|
||||
|
||||
Reference in new issue
Block a user