mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 06:35:24 +00:00
fix: finish 2.9.0 plugin moves and get every check green
This commit is contained in:
1 parent
8c1e02af89
commit
6489b62ece
335 files changed
+29878
-17749
No files matched your search
@@ -27,7 +27,9 @@ afterEach(async () => {
|
||||
describe("ssh-terminal activate", () => {
|
||||
it("serves the terminal socket", async () => {
|
||||
server = await startServer();
|
||||
expect(server.mock.wsRoutes).toEqual([{ path: "/terminal", raw: false }]);
|
||||
expect(server.mock.wsRoutes).toMatchObject([
|
||||
{ path: "/terminal", raw: false },
|
||||
]);
|
||||
});
|
||||
|
||||
it("provides sessions.live as ssh and terminal.history", async () => {
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { validateAdminSettings } from "../../src/backend/settings-validation.js";
|
||||
|
||||
describe("validateAdminSettings", () => {
|
||||
it("rejects relative image paths", () => {
|
||||
expect(
|
||||
Object.keys(
|
||||
validateAdminSettings({
|
||||
imageLocalDir: "images",
|
||||
imageHostPath: "tmp/images",
|
||||
}),
|
||||
).sort(),
|
||||
).toEqual(["imageHostPath", "imageLocalDir"]);
|
||||
});
|
||||
|
||||
it("accepts absolute paths and empty values", () => {
|
||||
expect(
|
||||
validateAdminSettings({ imageLocalDir: "", imageHostPath: "/tmp/img" }),
|
||||
).toEqual({});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user