diff --git a/test/core/commands/cd.test.ts b/test/core/commands/cd.test.ts index 59b9b18..c733033 100644 --- a/test/core/commands/cd.test.ts +++ b/test/core/commands/cd.test.ts @@ -1,8 +1,8 @@ import { descriptor as cd } from "@core/commands/cd"; import type { ResultError, ResultSuccess } from "@core/result"; +import type { UserInfo } from "@core/session_manager"; import { getCurrentSession } from "@core/session_manager"; import { createInitialShellState, withCwd, type ShellState } from "@core/shell_state"; -import type { UserInfo } from "@core/user_info"; import type { PathResolutionError } from "@core/util/errors"; import { buildTestFS, type FixtureNode } from "@tests/helpers/filesystems_fixture"; import { expect, test } from "vitest"; @@ -46,7 +46,7 @@ const fs = buildTestFS(testTree); const users: Map = new Map(); const user: UserInfo = { - name: "root", + username: "root", uid: 0, gid: 0, group: [0], diff --git a/test/core/commands/echo.test.ts b/test/core/commands/echo.test.ts index 8c081f5..be43b95 100644 --- a/test/core/commands/echo.test.ts +++ b/test/core/commands/echo.test.ts @@ -1,7 +1,7 @@ import { descriptor as echo } from "@core/commands/echo"; import type { ResultSuccess } from "@core/result"; +import type { UserInfo } from "@core/session_manager"; 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 { expect, test } from "vitest"; @@ -44,7 +44,7 @@ const fs = buildTestFS(testTree); const users: Map = new Map(); const user: UserInfo = { - name: "root", + username: "root", uid: 0, gid: 0, group: [0], diff --git a/test/core/filesystem/filesystem.test.ts b/test/core/filesystem/filesystem.test.ts index cf5e47f..9ad3166 100644 --- a/test/core/filesystem/filesystem.test.ts +++ b/test/core/filesystem/filesystem.test.ts @@ -1,6 +1,6 @@ import { FileSystem } from "@core/filesystem/filesystem"; 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 { expectAlreadyExistsError, @@ -128,7 +128,7 @@ describe("permission method group", () => { it("returns true for user read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 1000, gid: 1000, group: [1000], @@ -141,7 +141,7 @@ describe("permission method group", () => { }); it("returns false for user read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 1000, gid: 1000, group: [1000], @@ -154,7 +154,7 @@ describe("permission method group", () => { }); it("returns true for group read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 999, gid: 2000, group: [1000], @@ -167,7 +167,7 @@ describe("permission method group", () => { }); it("returns false for group read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 999, gid: 2000, group: [1000], @@ -180,7 +180,7 @@ describe("permission method group", () => { }); it("returns true for other read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 999, gid: 3000, group: [1000], @@ -193,7 +193,7 @@ describe("permission method group", () => { }); it("returns false for other read permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 999, gid: 3000, group: [1000], @@ -206,7 +206,7 @@ describe("permission method group", () => { }); it("returns true for user execute permissions", () => { const user: UserInfo = { - name: "root", + username: "root", uid: 1000, gid: 2000, group: [1000], diff --git a/test/core/session.test.ts b/test/core/session.test.ts index e10dced..66bee33 100644 --- a/test/core/session.test.ts +++ b/test/core/session.test.ts @@ -1,9 +1,9 @@ +import type { UserInfo } from "@core/session_manager"; import { createInitialSessionState } from "@core/session_manager"; -import type { UserInfo } from "@core/user_info"; import { expect, test } from "vitest"; const user: UserInfo = { - name: "root", + username: "root", uid: 0, gid: 0, group: [0], diff --git a/test/core/shell_state.test.ts b/test/core/shell_state.test.ts index fd90628..97bcf4e 100644 --- a/test/core/shell_state.test.ts +++ b/test/core/shell_state.test.ts @@ -1,8 +1,8 @@ import { FileSystem } from "@core/filesystem/filesystem"; import { TreeNodeType, type DirectoryNode, type TreeNode } from "@core/filesystem/treenode"; +import type { UserInfo } from "@core/session_manager"; import { getCurrentSession } from "@core/session_manager"; import { createInitialShellState, withCwd, withEnv, withExitCode, withHistory } from "@core/shell_state"; -import type { UserInfo } from "@core/user_info"; import { expect, test } from "vitest"; const map: Map = new Map(); @@ -29,7 +29,7 @@ const fs = FileSystem.init(base, overlay, 0); const users: Map = new Map(); const user: UserInfo = { - name: "root", + username: "root", uid: 0, gid: 0, group: [0],