fix(sqlite): validate ssh backup and query errors
This commit is contained in:
1 parent
e6f8b2187a
commit
9190554e50
58 files changed
+2815
-149
No files matched your search
@@ -238,6 +238,34 @@ describe("SshHostKeyPromptDialog web bridge", () => {
|
||||
expect(setSpy).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
it("shows worker-upload consent buttons and wraps the digest and path", async () => {
|
||||
await mountDialog();
|
||||
|
||||
const eventSource = MockEventSource.instances[0];
|
||||
eventSource?.emit({
|
||||
type: "prompt",
|
||||
request: {
|
||||
id: "worker-1",
|
||||
kind: "WorkerUploadConsent",
|
||||
host: "203.0.113.10",
|
||||
port: 22,
|
||||
fingerprint: "08ca4746e8fbf97038a93105d3ef023112e3f66bc097869401628c00acea7709",
|
||||
prompt: "/home/testuser/.cache/dbx/sqlite-worker/session-ebd207de-8f26cd6e-08ca4746e8fbf97038a93105d3ef023112e3f66bc097869401628c00acea7709",
|
||||
},
|
||||
});
|
||||
await nextTick();
|
||||
|
||||
expect(document.body.textContent).toContain("203.0.113.10:22");
|
||||
expect(document.body.textContent).toContain("08ca4746e8fbf97038a93105d3ef023112e3f66bc097869401628c00acea7709");
|
||||
expect(document.body.textContent).toContain("/home/testuser/.cache/dbx/sqlite-worker/");
|
||||
expect(dialogSource).toContain("break-all");
|
||||
expect(dialogSource).toContain("shrink-0");
|
||||
|
||||
const buttons = [...document.body.querySelectorAll("button")].map((button) => button.textContent?.trim());
|
||||
expect(buttons).toContain("Cancel");
|
||||
expect(buttons).toContain("Upload");
|
||||
});
|
||||
|
||||
it("submits a keyboard-interactive TOTP challenge as a secret response", async () => {
|
||||
await mountDialog();
|
||||
|
||||
|
||||
Reference in new issue
Block a user