minor import fixes - all tests pass

This commit is contained in:
2026-07-28 17:58:13 +02:00
parent 7348d3723e
commit 6bbaaf60e6
5 changed files with 16 additions and 16 deletions
+2 -2
View File
@@ -1,8 +1,8 @@
import { descriptor as cd } from "@core/commands/cd"; import { descriptor as cd } from "@core/commands/cd";
import type { ResultError, ResultSuccess } from "@core/result"; import type { ResultError, ResultSuccess } from "@core/result";
import type { UserInfo } from "@core/session_manager";
import { getCurrentSession } from "@core/session_manager"; import { getCurrentSession } from "@core/session_manager";
import { createInitialShellState, withCwd, type ShellState } from "@core/shell_state"; import { createInitialShellState, withCwd, type ShellState } from "@core/shell_state";
import type { UserInfo } from "@core/user_info";
import type { PathResolutionError } from "@core/util/errors"; import type { PathResolutionError } from "@core/util/errors";
import { buildTestFS, type FixtureNode } from "@tests/helpers/filesystems_fixture"; import { buildTestFS, type FixtureNode } from "@tests/helpers/filesystems_fixture";
import { expect, test } from "vitest"; import { expect, test } from "vitest";
@@ -46,7 +46,7 @@ const fs = buildTestFS(testTree);
const users: Map<number, UserInfo> = new Map(); const users: Map<number, UserInfo> = new Map();
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 0, uid: 0,
gid: 0, gid: 0,
group: [0], group: [0],
+2 -2
View File
@@ -1,7 +1,7 @@
import { descriptor as echo } from "@core/commands/echo"; import { descriptor as echo } from "@core/commands/echo";
import type { ResultSuccess } from "@core/result"; import type { ResultSuccess } from "@core/result";
import type { UserInfo } from "@core/session_manager";
import { createInitialShellState, type ShellState } from "@core/shell_state"; import { createInitialShellState, type ShellState } from "@core/shell_state";
import type { UserInfo } from "@core/user_info";
import { buildTestFS, type FixtureNode } from "@tests/helpers/filesystems_fixture"; import { buildTestFS, type FixtureNode } from "@tests/helpers/filesystems_fixture";
import { expect, test } from "vitest"; import { expect, test } from "vitest";
@@ -44,7 +44,7 @@ const fs = buildTestFS(testTree);
const users: Map<number, UserInfo> = new Map(); const users: Map<number, UserInfo> = new Map();
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 0, uid: 0,
gid: 0, gid: 0,
group: [0], group: [0],
+8 -8
View File
@@ -1,6 +1,6 @@
import { FileSystem } from "@core/filesystem/filesystem"; import { FileSystem } from "@core/filesystem/filesystem";
import { TreeNodeType, type DirectoryNode, type FileNode, type TreeNode } from "@core/filesystem/treenode"; import { TreeNodeType, type DirectoryNode, type FileNode, type TreeNode } from "@core/filesystem/treenode";
import type { UserInfo } from "@core/user_info"; import type { UserInfo } from "@core/session_manager";
import { createImmutableBuffer } from "@core/util/immutable_buffer"; import { createImmutableBuffer } from "@core/util/immutable_buffer";
import { import {
expectAlreadyExistsError, expectAlreadyExistsError,
@@ -128,7 +128,7 @@ describe("permission method group", () => {
it("returns true for user read permissions", () => { it("returns true for user read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 1000, uid: 1000,
gid: 1000, gid: 1000,
group: [1000], group: [1000],
@@ -141,7 +141,7 @@ describe("permission method group", () => {
}); });
it("returns false for user read permissions", () => { it("returns false for user read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 1000, uid: 1000,
gid: 1000, gid: 1000,
group: [1000], group: [1000],
@@ -154,7 +154,7 @@ describe("permission method group", () => {
}); });
it("returns true for group read permissions", () => { it("returns true for group read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 999, uid: 999,
gid: 2000, gid: 2000,
group: [1000], group: [1000],
@@ -167,7 +167,7 @@ describe("permission method group", () => {
}); });
it("returns false for group read permissions", () => { it("returns false for group read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 999, uid: 999,
gid: 2000, gid: 2000,
group: [1000], group: [1000],
@@ -180,7 +180,7 @@ describe("permission method group", () => {
}); });
it("returns true for other read permissions", () => { it("returns true for other read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 999, uid: 999,
gid: 3000, gid: 3000,
group: [1000], group: [1000],
@@ -193,7 +193,7 @@ describe("permission method group", () => {
}); });
it("returns false for other read permissions", () => { it("returns false for other read permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 999, uid: 999,
gid: 3000, gid: 3000,
group: [1000], group: [1000],
@@ -206,7 +206,7 @@ describe("permission method group", () => {
}); });
it("returns true for user execute permissions", () => { it("returns true for user execute permissions", () => {
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 1000, uid: 1000,
gid: 2000, gid: 2000,
group: [1000], group: [1000],
+2 -2
View File
@@ -1,9 +1,9 @@
import type { UserInfo } from "@core/session_manager";
import { createInitialSessionState } from "@core/session_manager"; import { createInitialSessionState } from "@core/session_manager";
import type { UserInfo } from "@core/user_info";
import { expect, test } from "vitest"; import { expect, test } from "vitest";
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 0, uid: 0,
gid: 0, gid: 0,
group: [0], group: [0],
+2 -2
View File
@@ -1,8 +1,8 @@
import { FileSystem } from "@core/filesystem/filesystem"; import { FileSystem } from "@core/filesystem/filesystem";
import { TreeNodeType, type DirectoryNode, type TreeNode } from "@core/filesystem/treenode"; import { TreeNodeType, type DirectoryNode, type TreeNode } from "@core/filesystem/treenode";
import type { UserInfo } from "@core/session_manager";
import { getCurrentSession } from "@core/session_manager"; import { getCurrentSession } from "@core/session_manager";
import { createInitialShellState, withCwd, withEnv, withExitCode, withHistory } from "@core/shell_state"; import { createInitialShellState, withCwd, withEnv, withExitCode, withHistory } from "@core/shell_state";
import type { UserInfo } from "@core/user_info";
import { expect, test } from "vitest"; import { expect, test } from "vitest";
const map: Map<number, TreeNode> = new Map(); const map: Map<number, TreeNode> = new Map();
@@ -29,7 +29,7 @@ const fs = FileSystem.init(base, overlay, 0);
const users: Map<number, UserInfo> = new Map(); const users: Map<number, UserInfo> = new Map();
const user: UserInfo = { const user: UserInfo = {
name: "root", username: "root",
uid: 0, uid: 0,
gid: 0, gid: 0,
group: [0], group: [0],