mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-30 07:05: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
@@ -0,0 +1,32 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { hostPayloadLegacy } from "../../src/backend/host-import.js";
|
||||
|
||||
describe("hostPayloadLegacy", () => {
|
||||
it("rebuilds the 2.8 statsConfig Termix-Mobile reads", () => {
|
||||
const { statsConfig } = hostPayloadLegacy(
|
||||
{ metricsEnabled: false, metricsInterval: 45, enabledWidgets: ["cpu"] },
|
||||
{ statusCheckEnabled: true, statusCheckInterval: null },
|
||||
) as { statsConfig: Record<string, unknown> };
|
||||
|
||||
expect(statsConfig).toMatchObject({
|
||||
enabledWidgets: ["cpu"],
|
||||
statusCheckEnabled: true,
|
||||
useGlobalStatusInterval: true,
|
||||
metricsEnabled: false,
|
||||
metricsInterval: 45,
|
||||
useGlobalMetricsInterval: false,
|
||||
});
|
||||
});
|
||||
|
||||
it("carries a host's own status interval", () => {
|
||||
const { statsConfig } = hostPayloadLegacy(
|
||||
{},
|
||||
{ statusCheckEnabled: false, statusCheckInterval: 120 },
|
||||
) as { statsConfig: Record<string, unknown> };
|
||||
expect(statsConfig).toMatchObject({
|
||||
statusCheckEnabled: false,
|
||||
statusCheckInterval: 120,
|
||||
useGlobalStatusInterval: false,
|
||||
});
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user