test: align runtime fixtures across platforms
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build darwin arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build darwin arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
Account for Electron-as-Node when probing the current executable and update the Linux workspace registry scenario to validate the writable handle behavior shipped with remote file management.
This commit is contained in:
@@ -137,7 +137,7 @@ describe('WorkspaceRegistry', () => {
|
|||||||
).rejects.toMatchObject({ code: 'workspace-not-found' })
|
).rejects.toMatchObject({ code: 'workspace-not-found' })
|
||||||
})
|
})
|
||||||
|
|
||||||
linuxIt('enforces read-only policy, caps, and symlink-root rejection', async () => {
|
linuxIt('supports writable handles while enforcing caps and symlink-root rejection', async () => {
|
||||||
const root = temporaryDirectory()
|
const root = temporaryDirectory()
|
||||||
const linked = join(tmpdir(), `goodbuddy-linked-${Date.now()}`)
|
const linked = join(tmpdir(), `goodbuddy-linked-${Date.now()}`)
|
||||||
symlinkSync(root, linked, 'dir')
|
symlinkSync(root, linked, 'dir')
|
||||||
@@ -149,16 +149,20 @@ describe('WorkspaceRegistry', () => {
|
|||||||
maximumControllerHandles: 1,
|
maximumControllerHandles: 1,
|
||||||
inspectGit: async () => 'not-a-repository'
|
inspectGit: async () => 'not-a-repository'
|
||||||
})
|
})
|
||||||
await expect(
|
const writable = await registry.validate(
|
||||||
registry.validate(
|
{
|
||||||
{
|
remoteRootPath: root,
|
||||||
remoteRootPath: root,
|
requestedAccess: 'read-write',
|
||||||
requestedAccess: 'read-write',
|
requiredCapabilities: []
|
||||||
requiredCapabilities: []
|
},
|
||||||
},
|
controller
|
||||||
controller
|
)
|
||||||
)
|
expect(writable.handle.access).toBe('read-write')
|
||||||
).rejects.toMatchObject({ code: 'read-only' })
|
await registry.close(
|
||||||
|
writable.handle.workspaceId,
|
||||||
|
writable.handle.generation,
|
||||||
|
controller
|
||||||
|
)
|
||||||
await expect(
|
await expect(
|
||||||
registry.validate(
|
registry.validate(
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ describe('runtime discovery', () => {
|
|||||||
await expect(validation).resolves.toEqual({ valid: false })
|
await expect(validation).resolves.toEqual({ valid: false })
|
||||||
})
|
})
|
||||||
|
|
||||||
it('canonicalizes a configured ordinary file without launching it', async () => {
|
it('canonicalizes and validates a configured ordinary file first', async () => {
|
||||||
process.env.PATH = ''
|
process.env.PATH = ''
|
||||||
process.env.Path = ''
|
process.env.Path = ''
|
||||||
|
|
||||||
@@ -90,7 +90,11 @@ describe('runtime discovery', () => {
|
|||||||
path: await realpath(process.execPath),
|
path: await realpath(process.execPath),
|
||||||
source: 'configured'
|
source: 'configured'
|
||||||
})
|
})
|
||||||
expect(detection.version).toBeUndefined()
|
if (process.versions.electron) {
|
||||||
|
expect(detection.version).toBeUndefined()
|
||||||
|
} else {
|
||||||
|
expect(detection.version).toMatch(/^\d+\.\d+\.\d+/u)
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
it('trusts a configured execution path without reading or launching it', async () => {
|
it('trusts a configured execution path without reading or launching it', async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user